« Bugzilla Issues Index
#2609 — `RegExp.prototype.toString()`
- bug_id:
2609
- creation_ts:
2014-04-09 14:11:00 -0700
- short_desc:
`RegExp.prototype.toString()`
- delta_ts:
2014-04-16 15:22:38 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 23: April 5, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
WORKSFORME
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Mathias Bynens
- assigned_to:
Allen Wirfs-Brock
- cc:
["lukeh", "mathias"]
- commentid:
7631
- comment_count:
0
- who:
Mathias Bynens
- bug_when:
2014-04-09 14:11:16 -0700
As discussed during the Apr 9 meeting, specifying `RegExp.prototype.toString` completely is a can of worms, and we should leave it up to implementations.
Waldemar suggested the spec should add a requirement that makes `eval(RegExp(string))` hold true for all values of string (browsers get this wrong).
- commentid:
7637
- comment_count:
1
- who:
Mathias Bynens
- bug_when:
2014-04-09 16:45:14 -0700
Requirement could go something among the lines of:
> The result of `RegExp.prototype.toString`, when called on a regular expression object, should be usable as a regular expression literal.
- commentid:
7756
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-16 15:22:38 -0700
this is already covered in much more detail within
21.2.3.3.4 EscapeRegExpPattern