archives

« Bugzilla Issues Index

#22 — S15.10.6_A2 asserting incorrect behavior


S15.10.6_A2 Checking performs with toString function
function testcase() {
RegExp.prototype.toString = Object.prototype.toString;
if (RegExp.prototype.toString() !== "[object Object]") {
$ERROR("#1: RegExp.prototype.toString =
Object.prototype.toString; RegExp.prototype.toString() === \"[object
\" + \"Object\" + \"]\". Actual: " + RegExp.prototype.toString());
}
}

SpiderMonkey fails the test because it returns the correct answer, which is "[object RegExp]". (The [[Class]] of RegExp.prototype is "RegExp" according to ES5 section 15.10.6.)


Agree and I'll be disabling it shortly.


Fixed at http://hg.ecmascript.org/tests/test262/rev/c6c9f7f6bc10