archives

« Bugzilla Issues Index

#3468 — 21.2.5.11 RegExp.prototype [ @@split ]: Inconsistent lastIndex conversion


21.2.5.11 RegExp.prototype [ @@split ] ( string, limit )

Step 23.f.i uses ToLength to convert the "lastIndex" property, other algorithms use ToInteger instead.


fixed in rev30 editor's draft

ToLength looks like the better choice for almost all of places in these algorithms that retrieve 'lastIndex'. So I changed all of them where it seems appropriate.

It might be even better to throw if the 'lastIndex' value is outside of toLength range, but I didn't make that change.


fixed in rev30