Closed
Bug 443916
Opened 17 years ago
Closed 6 years ago
String.replace() misinterprets $nn replacements
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: brbaker, Unassigned)
References
Details
Description:
With String.replace() method used with "$nn" in ActionScript
3.0, "$0"+n seems to be recognized as "$"+n+n.
Steps:
1. Write the frame action below:
// ActionScript 3.0
// frame action
var _str:String = "2008-01-25";
var n:int = 1; // or 2, or 3
trace(_str.replace(/(\d+)-(\d+)-(\d+)/g, "$"+n));
trace(_str.replace(/(\d+)-(\d+)-(\d+)/g, "$0"+n));
2. [Test Movie] and see the result in [Output] panel.
actual results:
2008
20081
expected results:
2008
2008
Transferred Comments:
Trevor McCauley - Tue Jun 10 12:47:13 CDT 2008
tested against spidermonkey and got the expected 2008
Reporter | ||
Comment 1•17 years ago
|
||
This issue is not present in tamarin-tracing.
Reporter | ||
Comment 2•16 years ago
|
||
Issue is present in tamarin-central (#703)
tamarin:
"$"+n => 2008
"$0"+n => 20081
"$"+n+n => 20081
SpiderMonkey:
"$"+n => 2008
"$0"+n => 2008
"$"+n+n => 20081
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Updated•16 years ago
|
Blocks: AS3_Builtins
Flags: flashplayer-qrb? → flashplayer-qrb+
Target Milestone: --- → Future
Updated•15 years ago
|
Flags: flashplayer-needsversioning?
Updated•15 years ago
|
Flags: flashplayer-needsversioning? → flashplayer-needsversioning+
Comment 3•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 4•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
•