Index: src/regexp.js |
diff --git a/src/regexp.js b/src/regexp.js |
index b6bf3f983750b4a44f42ccec4cfebb2babca3cb0..bae2e1eb40dacc384a09d81fb8958c6a0434191c 100644 |
--- a/src/regexp.js |
+++ b/src/regexp.js |
@@ -48,9 +48,7 @@ $regexpLastMatchInfoOverride = null; |
function DoConstructRegExp(object, pattern, flags) { |
// RegExp : Called as constructor; see ECMA-262, section 15.10.4. |
if (IS_REGEXP(pattern)) { |
- if (!IS_UNDEFINED(flags)) { |
- throw MakeTypeError('regexp_flags', []); |
- } |
+ if (!IS_UNDEFINED(flags)) throw MakeTypeError(kRegExpFlags); |
flags = (pattern.global ? 'g' : '') |
+ (pattern.ignoreCase ? 'i' : '') |
+ (pattern.multiline ? 'm' : ''); |