From 25c8b2d6313d8d968597dd5ef8ecd91825d00894 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 24 Feb 2018 14:59:27 +0100 Subject: [PATCH 1/2] fixed: typo in call to replaceObjectsAtIndexes --- Foundation/CPKeyValueObserving.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/CPKeyValueObserving.j b/Foundation/CPKeyValueObserving.j index e4b55f752..4c08aee1e 100644 --- a/Foundation/CPKeyValueObserving.j +++ b/Foundation/CPKeyValueObserving.j @@ -209,7 +209,7 @@ [[self mutableArrayValueForKeyPath:aKeyPath] removeObjectsAtIndexes:indexes]; else if (changeKind === CPKeyValueChangeReplacement) - [[self mutableArrayValueForKeyPath:aKeyPath] replaceObjectAtIndexes:indexes withObjects:newValue]; + [[self mutableArrayValueForKeyPath:aKeyPath] replaceObjectsAtIndexes:indexes withObjects:newValue]; } else { From 8550abadef6ebfa37e0985820862f1768fa2c527 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 24 Feb 2018 15:41:17 +0100 Subject: [PATCH 2/2] fixed: fromObject:(id)object index:(id)anIndex failed to raise if argument was not CPDictionary or CPArray --- Foundation/CPPredicate/_CPFunctionExpression.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/CPPredicate/_CPFunctionExpression.j b/Foundation/CPPredicate/_CPFunctionExpression.j index 7de9f0d73..1ae0e269e 100644 --- a/Foundation/CPPredicate/_CPFunctionExpression.j +++ b/Foundation/CPPredicate/_CPFunctionExpression.j @@ -220,7 +220,7 @@ var CPSelectorNameKey = @"CPSelectorName", { if ([object isKindOfClass:[CPDictionary class]]) return [object objectForKey:anIndex]; - else ([object isKindOfClass:[CPArray class]]) + else if ([object isKindOfClass:[CPArray class]]) return [object objectAtIndex:anIndex]; [CPException raise:CPInvalidArgumentException reason:@"object[#] requires a CPDictionary or CPArray"];