Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 var re = /a(b)c/;
3 for (var i = 0; i < 10; i++) {
4 // These two are of a form where we can convert exec() to test().
5 if (!re.exec("abc")) print("huh?");
6 re.exec("abc");
7 }
9 RegExp.prototype.test = 1;
11 for (var i = 0; i < 10; i++) {
12 // These two are the same form, but we've replaced test(), so we must
13 // not convert.
14 if (!re.exec("abc")) print("huh?"); // don't crash/assert
15 re.exec("abc"); // don't crash/assert
16 }