(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:
igor%mir2.org 2003-11-24 15:51:44 +00:00
parent 4f9f5d1d92
commit 309b08a3a6

View File

@ -201,7 +201,12 @@ public class NativeRegExp extends IdScriptable implements Function {
{
StringBuffer buf = new StringBuffer();
buf.append('/');
if (re.source.length != 0) {
buf.append(re.source);
} else {
// See bugzilla 226045
buf.append("(?:)");
}
buf.append('/');
if ((re.flags & JSREG_GLOB) != 0)
buf.append('g');