Index: src/js/string.js |
diff --git a/src/js/string.js b/src/js/string.js |
index 3fa8e5c2b700c76a396d6da53f70102b16c82cad..c4d25238b4e9951abfb0c769494a1273ba9c9eeb 100644 |
--- a/src/js/string.js |
+++ b/src/js/string.js |
@@ -151,9 +151,6 @@ function StringMatchJS(regexp) { |
var subject = TO_STRING(this); |
if (IS_REGEXP(regexp)) { |
- // Emulate RegExp.prototype.exec's side effect in step 5, even though |
- // value is discarded. |
- var lastIndex = TO_INTEGER(regexp.lastIndex); |
if (!regexp.global) return RegExpExecNoTests(regexp, subject, 0); |
var result = %StringMatch(subject, regexp, RegExpLastMatchInfo); |
if (result !== null) $regexpLastMatchInfoOverride = null; |
@@ -222,10 +219,6 @@ function StringReplace(search, replace) { |
// ...... string replace (with $-expansion) |
if (IS_REGEXP(search)) { |
- // Emulate RegExp.prototype.exec's side effect in step 5, even if |
- // value is discarded. |
- var lastIndex = TO_INTEGER(search.lastIndex); |
- |
if (!IS_CALLABLE(replace)) { |
replace = TO_STRING(replace); |