Closed Bug 443916 Opened 17 years ago Closed 6 years ago

String.replace() misinterprets $nn replacements

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
All
defect
Not set
normal

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
This issue is not present in tamarin-tracing.
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?
Blocks: AS3_Builtins
Flags: flashplayer-qrb? → flashplayer-qrb+
Target Milestone: --- → Future
Flags: flashplayer-needsversioning?
Flags: flashplayer-needsversioning? → flashplayer-needsversioning+
Depends on: 535770
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.