puma
puma copied to clipboard
Wrong return values for Object.prototype.toString() method
The Object.prototype.toString() method, when called, should return the following:
- If the this value is undefined, return "[object Undefined]".
- If the this value is null, return "[object Null]". (...) as specified in the ECMA Standard [http://www.ecma-international.org/ecma-262/5.1/#sec-15.2.4.2]
Calling the method with the this parameter set as either undefined or null values returns [object DOMWindow] E.g.:
Object.prototype.toString.call(undefined);
Correlated tests::
/test/suites/Tests-15-ECMA.js ~293 (Object.prototype.toString(): undefined)
/test/suites/Tests-15-ECMA.js ~300 (Object.prototype.toString(): null)