Reviewers: Mads Ager,

Description:
Fix regression in regexp-caching.html

Please review this at http://codereview.chromium.org/27273

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/regexp-delay.js
   M     test/mjsunit/regexp-static.js


Index: test/mjsunit/regexp-static.js
===================================================================
--- test/mjsunit/regexp-static.js       (revision 1389)
+++ test/mjsunit/regexp-static.js       (working copy)
@@ -132,3 +132,8 @@
  re = /(.)/g;
  function f() { return RegExp.$1; };
  assertEquals('abcd', 'abcd'.replace(re, f));
+
+RegExp.multiline = "foo";
+assertTrue(typeof RegExp.multiline == typeof Boolean(), "RegExp.multiline  
coerces values to booleans");
+RegExp.input = Number();
+assertTrue(typeof RegExp.input == typeof String(), "RegExp.input coerces  
values to booleans");
Index: src/regexp-delay.js
===================================================================
--- src/regexp-delay.js (revision 1389)
+++ src/regexp-delay.js (working copy)
@@ -318,7 +318,8 @@
      return IS_UNDEFINED(regExpInput) ? "" : regExpInput;
    }
    function RegExpSetInput(string) {
-    lastMatchInfo[lastMatchInfo[REGEXP_NUMBER_OF_CAPTURES] + 2] = string;
+    lastMatchInfo[lastMatchInfo[REGEXP_NUMBER_OF_CAPTURES] + 2] =
+        ToString(string);
    };

    %DefineAccessor($RegExp, 'input', GETTER, RegExpGetInput, DONT_DELETE);



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to