Index: test/mjsunit/string-split.js |
diff --git a/test/mjsunit/string-split.js b/test/mjsunit/string-split.js |
index 9a5bb43f4a3b665d1c477d367dfa6b85808b3da5..bc509451355579c1074982396a6b8320c2b7befc 100644 |
--- a/test/mjsunit/string-split.js |
+++ b/test/mjsunit/string-split.js |
@@ -117,13 +117,14 @@ assertEquals(["a", "b", "c"], "abc".split("", numberObj(3))); |
assertEquals(["a", "b", "c"], "abc".split("", 4)); |
assertEquals(["a", "b", "c"], "abc".split("", numberObj(4))); |
-var all_ascii_chars = []; |
-for (var i = 0; i < 128; i++) all_ascii_chars[i] = String.fromCharCode(i); |
-var all_ascii_string = all_ascii_chars.join(""); |
+ |
+var all_ascii_codes = []; |
+for (var i = 0; i < 128; i++) all_ascii_codes[i] = i; |
+var all_ascii_string = String.fromCharCode.apply(String, all_ascii_codes); |
var split_chars = all_ascii_string.split(""); |
assertEquals(128, split_chars.length); |
for (var i = 0; i < 128; i++) { |
assertEquals(1, split_chars[i].length); |
assertEquals(i, split_chars[i].charCodeAt(0)); |
-} |
+} |