blob: d47d5c8080c8c73bc72bcaf5d1d522c9b1cb8732 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var exec = RegExp.prototype.exec;
var nested = Object.create(RegExp.prototype);
nested.exec = "Hello";
shouldBe(nested.hasOwnProperty('exec'), true);
shouldBe(nested.exec, "Hello");
shouldBe(/hello/.exec, exec);