Closed
Bug 504567
Opened 15 years ago
Closed 6 years ago
String.split() fails when using patterns that can match empty string and pattern is not at the beginning of string
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
WONTFIX
Q1 12 - Brannan
People
(Reporter: brbaker, Unassigned)
References
Details
(Whiteboard: WE:2776977)
Attachments
(2 files)
Transferred bug from Adobe JIRA bug system:
https://bugs.adobe.com/jira/browse/ASC-3628
String.split(pattern) will only match if the pattern is at the beginning of the string.
Test:
trace("ab".split(/a*/));
trace("abab".split(/a*/));
trace("babab".split(/a*/));
Actual Results:
,b
,bab
babab
Expected Results:
,b
,b,b
b,b,b
Expected results are produced by firefox
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Reporter | ||
Comment 1•15 years ago
|
||
Attachment #388914 -
Flags: review?(dschaffe)
Reporter | ||
Comment 2•15 years ago
|
||
Attachment #388915 -
Flags: review?(dschaffe)
Reporter | ||
Updated•15 years ago
|
Summary: String.split() fails when using patterns that can match not at the beginning of string → String.split() fails when using patterns that can match empty string and pattern is not at the beginning of string
Updated•15 years ago
|
Attachment #388914 -
Flags: review?(dschaffe) → review+
Updated•15 years ago
|
Attachment #388915 -
Flags: review?(dschaffe) → review+
Reporter | ||
Comment 3•15 years ago
|
||
This is not a recent injection, has been around since fp9
Reporter | ||
Comment 4•15 years ago
|
||
testcase pushed with "expectedfail" 2154:1103df25c6a4
Reporter | ||
Updated•15 years ago
|
Flags: in-testsuite? → in-testsuite+
Blocks: AS3_Builtins
Assignee: nobody → daumling
Status: NEW → ASSIGNED
Flags: flashplayer-qrb? → flashplayer-qrb+
Target Milestone: --- → flash10.1
Updated•15 years ago
|
Assignee: daumling → tharwood
Updated•15 years ago
|
Priority: -- → P3
Comment 5•15 years ago
|
||
I don't believe that PCRE can be configured to work as expected. ECMA-262 15.5.4.14 says:
"If separator is a regular expression, only the first match at a given position of the this string is considered, even if backtracking could yield a non-empty-substring match at that position."
In the particular test case, "a*" would expect to match "a" only, not the empty string as in "abab" (matching "a", then the empty string between the first "a" and "bab". String.split() expects the RegExp to be partially greedy.
This should be a documented deviation from ECMA-262 IMHO.
Comment 6•15 years ago
|
||
Any fix for this bug will likely need version-checking for backwards compatibility.
Reporter | ||
Comment 7•15 years ago
|
||
Reset in-testsuite to '?' as this will require version testing
Flags: in-testsuite+ → in-testsuite?
Updated•15 years ago
|
Flags: flashplayer-needsversioning+
Updated•15 years ago
|
Target Milestone: flash10.1 → Future
Updated•15 years ago
|
Priority: P3 → --
Comment 8•14 years ago
|
||
we bug is assigned to Serrano.
Assignee: tharwood → nobody
Status: ASSIGNED → NEW
Flags: flashplayer-qrb+ → flashplayer-qrb?
Whiteboard: WE:2776977
Target Milestone: Future → ---
Updated•14 years ago
|
Target Milestone: --- → Q3 11 - Serrano
Updated•14 years ago
|
Target Milestone: Q3 11 - Serrano → Future
Updated•14 years ago
|
Target Milestone: Future → Q1 12 - Brannan
Comment 10•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 11•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•