fix CPPredicate predicateWithFormat: throwing exception (in WebKit)

I believe the exception was caused because WebKit thought arguments was the function.Arguments.
Issue was resolved by renaming the local arguments variable to args
This commit is contained in:
Klaas Pieter Annema
2010-08-26 16:55:05 +02:00
parent f4e7386a0a
commit ddad10b615
+2 -2
View File
@@ -52,12 +52,12 @@
@param arguments The arguments to substitute into predicateFormat. Values are substituted into predicateFormat in the order they appear in the array.
@return A new predicate by substituting the values in arguments into predicateFormat, and parsing the result.
*/
+ (CPPredicate)predicateWithFormat:(CPString)format argumentArray:(CPArray)arguments
+ (CPPredicate)predicateWithFormat:(CPString)format argumentArray:(CPArray)args
{
if (!format)
[CPException raise:CPInvalidArgumentException reason:_cmd + " the format can't be 'nil'"];
var s = [[CPPredicateScanner alloc] initWithString:format args:arguments],
var s = [[CPPredicateScanner alloc] initWithString:format args:args],
p = [s parse];
return p;