« Bugzilla Issues Index
#3469 — 21.2.5.11 RegExp.prototype [ @@split ]: Wrong loop indexing and missing increment for lengthA
- bug_id:
3469
- creation_ts:
2014-12-17 13:14:00 -0800
- short_desc:
21.2.5.11 RegExp.prototype [ @@split ]: Wrong loop indexing and missing increment for lengthA
- delta_ts:
2014-12-23 20:23:34 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 29: December 06, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
11072
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-12-17 13:14:01 -0800
21.2.5.11 RegExp.prototype [ @@split ] ( string, limit )
(1) Increment `lengthA` after step 23.f.iv.3
(2) The capturing group indexing is wrong in 23.f.iv.9.
Maybe change to:
---
Let captureLen be ToLength(Get(splitter, "length")).
ReturnIfAbrupt(captureLen).
Let i be 1.
Repeat while i < captureLen.
Let nextCapture be Get(splitter, ToString(i)).
Let i be i + 1.
...
---
Or:
---
Let nCaptures be ToLength(Get(result, "length")).
ReturnIfAbrupt(nCaptures).
Let nCaptures be max(nCaptures − 1, 0).
Let i be 1.
Repeat while i ≤ nCaptures.
Let nextCapture be Get(splitter, ToString(i)).
Let i be i + 1.
...
---
Also see step 17 in 21.2.5.8 RegExp.prototype [ @@replace ].
- commentid:
11082
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-12-17 17:32:46 -0800
fixed in rev30 editor's draft
- commentid:
11224
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-12-23 20:23:34 -0800
fixed in rev30