diff --git a/src/js/regexp.js b/src/js/regexp.js index 3ca5c39811..2ad7e336ea 100644 --- a/src/js/regexp.js +++ b/src/js/regexp.js @@ -693,9 +693,6 @@ utils.InstallGetter(GlobalRegExp.prototype, 'ignoreCase', RegExpGetIgnoreCase); utils.InstallGetter(GlobalRegExp.prototype, 'multiline', RegExpGetMultiline); utils.InstallGetter(GlobalRegExp.prototype, 'source', RegExpGetSource); -// The length of compile is 1 in SpiderMonkey. -%FunctionSetLength(GlobalRegExp.prototype.compile, 1); - // The properties `input` and `$_` are aliases for each other. When this // value is set the value it is set to is coerced to a string. // Getter and setter for the input. diff --git a/test/mjsunit/regexp-compile.js b/test/mjsunit/regexp-compile.js index 6a24325e16..92c3f7b3dd 100644 --- a/test/mjsunit/regexp-compile.js +++ b/test/mjsunit/regexp-compile.js @@ -40,3 +40,5 @@ assertEquals(["x", "x"], re.exec("axyb")); re.compile("(y)"); assertEquals(["y", "y"], re.exec("axyb")); + +assertEquals(2, re.compile.length);