(new RegExp).toString/toSource() now gives /(?:)/ instead of // which is comments and does not work with uneval. git-svn-id: svn://10.0.0.236/trunk@149680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4f9f5d1d92
commit
309b08a3a6
@ -201,7 +201,12 @@ public class NativeRegExp extends IdScriptable implements Function {
|
|||||||
{
|
{
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
buf.append('/');
|
buf.append('/');
|
||||||
|
if (re.source.length != 0) {
|
||||||
buf.append(re.source);
|
buf.append(re.source);
|
||||||
|
} else {
|
||||||
|
// See bugzilla 226045
|
||||||
|
buf.append("(?:)");
|
||||||
|
}
|
||||||
buf.append('/');
|
buf.append('/');
|
||||||
if ((re.flags & JSREG_GLOB) != 0)
|
if ((re.flags & JSREG_GLOB) != 0)
|
||||||
buf.append('g');
|
buf.append('g');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user