Closed
Bug 177314
Opened 22 years ago
Closed 22 years ago
Rhino should allow '\400' to mean ' 0'
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R4
People
(Reporter: user, Assigned: norrisboyd)
Details
Attachments
(1 file)
2.40 KB,
patch
|
Details | Diff | Splinter Review |
Although octal escapes in string literals are not part of Ecma 262 since the
version 3, to support old scripts Rhino should handle them correctly. In
particular, currently Rhino throws an error when evaluating
'\400' == ' 0'
js> '\400' == ' 0'
js: "<stdin>", line 1: uncaught JavaScript exception: SyntaxError: octal escape
too large (<stdin>; line 1)
js: '\400' == ' 0'
js: ....^
while SM gives true, which is what required by Ecma 262 version 1 and 2.
Reporter | ||
Comment 1•22 years ago
|
||
The patch also removes msg.oct.esc.too.large from the resources as it is no
onger used
Reporter | ||
Comment 2•22 years ago
|
||
I commited the above patch, as it passes the test suite and gives true '\400' ==
' 0'. The question is where to put a testcase for it?
Comment 3•22 years ago
|
||
Testcase added to JS testsuite:
mozilla/js/tests/js1_5/LexicalConventions/regress-177314.js
Reporter | ||
Comment 4•22 years ago
|
||
Marking as fixed as the patch was commited.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 5•22 years ago
|
||
Marking Verified FIXED.
Before the patch, Rhino errored on the testcase as described above.
Now, the testcase passes in both compiled and interpreted mode -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•