Skip to content

Commit bfe9e11

Browse files
ajkleinbterlson
authored andcommitted
Revert String.prototype.split's to ES5 behavior
ES2015 changed the handling of the second argument to split() to use ToLength for coercion, which causes problems for callers that pass -1. As discussed at the July 2015 meeting, the committee agreed to return to the ES5 behavior. See https://bugs.ecmascript.org/show_bug.cgi?id=4432 for more details.
1 parent a3ced3c commit bfe9e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27390,7 +27390,7 @@ <h1>String.prototype.split ( separator, limit )</h1>
2739027390
1. ReturnIfAbrupt(_S_).
2739127391
1. Let _A_ be ArrayCreate(0).
2739227392
1. Let _lengthA_ be 0.
27393-
1. If _limit_ is *undefined*, let _lim_ = 2<sup>53</sup>-1; else let _lim_ = ToLength(_limit_).
27393+
1. If _limit_ is *undefined*, let _lim_ = 2<sup>32</sup>-1; else let _lim_ = ToUint32(_limit_).
2739427394
1. ReturnIfAbrupt(_lim_).
2739527395
1. Let _s_ be the number of elements in _S_.
2739627396
1. Let _p_ = 0.

0 commit comments

Comments
 (0)