diff --git a/Foundation/CPPredicate/_CPBlockExpression.j b/Foundation/CPPredicate/_CPBlockExpression.j index 4b1472e1a..10a007205 100644 --- a/Foundation/CPPredicate/_CPBlockExpression.j +++ b/Foundation/CPPredicate/_CPBlockExpression.j @@ -65,12 +65,10 @@ { var args = []; - if (_arguments !== nil) + [_arguments enumerateObjectsUsingBlock:function(exp, idx) { - args = _arguments.map(function(expression){ - return [expression expressionValueWithObject:object context:context]; - }); - } + [args addObject:[exp expressionValueWithObject:object context:context]]; + }]; return _block(object, args, context); } @@ -89,7 +87,7 @@ - (CPString)description { - return [CPString stringWithFormat:@"Block(0x%@)", [CPString stringWithHash:[self UID]]]; + return [CPString stringWithFormat:@"Block(function, %@)", [_arguments description]]; } @end \ No newline at end of file