Skip to content

Commit

Permalink
Support for Rubymotion
Browse files Browse the repository at this point in the history
The NSDictionary that rubymotion creates from hashes doesn't seem to gel well with `indexOfObjectIdenticalTo`, perhaps something to do with the way constants are handled? This change allows CRToast to be used with rubymotion while keeping the valid key checking intact.
  • Loading branch information
balvig committed Jul 30, 2014
1 parent b8ff444 commit 326843b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRToast/CRToast.m
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ - (void)setOptions:(NSDictionary *)options {
NSMutableDictionary *cleanOptions = [options mutableCopy];
[options enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
//Check keys validity followed by checking objects type validity
if ([kCRToastKeyClassMap.allKeys indexOfObjectIdenticalTo:key] == NSNotFound) {
if ([kCRToastKeyClassMap.allKeys indexOfObject:key] == NSNotFound) {
NSLog(@"[CRToast] : ERROR given unrecognized key %@ in options with object %@",
key,
obj);
Expand Down

0 comments on commit 326843b

Please sign in to comment.