archives

« Bugzilla Issues Index

#270 — 15.4.4.4-5-c-i-1.js newArr[0] is Number Object (new Number(101))


Created attachment 10
patch for this test case

In ECMA262 5.1 section 15.4.4.4

1. Let O be the result of calling ToObject passing the this value as the argument.

and

4. Let items be an internal List whose first element is O...

Then, in this test case, I think that first E at 5-a is number object `new Number(101)` and typeof newArr[0] is 'object'.


Agreed, the first E in 5.a should be O, the result of a ToObject conversion.

Fixing this test would require two changes:
var instanceOfVerify = typeof newArr[0]==="number";
should read:
var instanceOfVerify = typeof newArr[0]==="object";
and:
verifyValue = newArr[0] === 101;
should read:
verifyValue = newArr[0] == 101;


*** Bug 275 has been marked as a duplicate of this bug. ***


Thanks guys. Agree with the description below, and I'll work to get this fixed in the live website soon.


Test changes are now live on test262.ecmascript.org.