Closed Bug 351463 Opened 19 years ago Closed 17 years ago

Perl RegExp test 827: /([\d-\s]+)/.exec('a0- z')

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bc, Unassigned)

References

()

Details

expected 0- ,0- (MSIE agrees) actual SyntaxError on line 1: invalid range in character class there are several other character class tests some of which MSIE also flags as syntax errors that I haven't filed.
The syntax error is correct as far as I can tell and comes from ES4 15.10.2.15 NonemptyClassRanges.
The spec should be errata'ed. All the browsers seem to handle this fine now, they just treat hyphens next to \d \w \s etc as not being part of a range.
This is fixed by the patch in bug 375876 (we agree with MSIE6 here, now), and I believe rightly so.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
If we don't raise a syntax error, it's not spec-compliant. I agree that we should change the spec though.
Yes, I agree; see bug 375876 comment #9
/cvsroot/mozilla/js/tests/public-failures.txt,v <-- public-failures.txt new revision: 1.17; previous revision: 1.16 /cvsroot/mozilla/js/tests/js1_5/extensions/regress-351463-01.js,v <-- regress-351463-01.js initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
v
Status: RESOLVED → VERIFIED
Reopening this one then. Either the fix was wrong, because it violates ECMA, or we do that by purpose, then a comment explaining why we do that is missing in the source, see bug 428703.
Status: VERIFIED → REOPENED
Hardware: PC → All
Resolution: FIXED → ---
this bug is fixed. if we need a comment explaining it or a devnote, please file a new bug.
Status: REOPENED → RESOLVED
Closed: 18 years ago17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
If this is an intentional non-compliance to ES3, please report it to the es3.x-discuss list, and perhaps the spec can be changed.
You need to log in before you can comment on or make changes to this bug.