From 3bb70c1c498af17e711fcd1ddc6dcce078b452ad Mon Sep 17 00:00:00 2001 From: Roberto Raggi <roberto.raggi@nokia.com> Date: Tue, 26 Jan 2010 12:38:52 +0100 Subject: [PATCH] Fixed String.prototype.split. The property `length' should be 1 and not 2. --- src/libs/qmljs/qmljsinterpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 5334ad3bb2c..9c3468a1645 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -1547,7 +1547,7 @@ void Engine::initializePrototypes() addFunction(_stringPrototype, "replace", stringValue(), 2); addFunction(_stringPrototype, "search", numberValue(), 1); addFunction(_stringPrototype, "slice", stringValue(), 2); - addFunction(_stringPrototype, "split", newArray(), 2); + addFunction(_stringPrototype, "split", newArray(), 1); addFunction(_stringPrototype, "substring", stringValue(), 2); addFunction(_stringPrototype, "toLowerCase", stringValue(), 0); addFunction(_stringPrototype, "toLocaleLowerCase", stringValue(), 0); -- GitLab