diff --git a/src/v8natives.js b/src/v8natives.js index 2fecee80c0..8ba6a8e748 100644 --- a/src/v8natives.js +++ b/src/v8natives.js @@ -196,10 +196,7 @@ $Object.prototype.constructor = $Object; // ECMA-262 - 15.2.4.2 function ObjectToString() { - var c = %_ClassOf(this); - // Hide Arguments from the outside. - if (c === 'Arguments') c = 'Object'; - return "[object " + c + "]"; + return "[object " + %_ClassOf(this) + "]"; } diff --git a/test/mjsunit/regress/regress-124.js b/test/mjsunit/regress/regress-124.js index 81526b0edd..0b3aae5358 100644 --- a/test/mjsunit/regress/regress-124.js +++ b/test/mjsunit/regress/regress-124.js @@ -48,9 +48,9 @@ function F(f) { assertEquals("[object global]", eval("f()")); // Receiver should be the arguments object here. - assertEquals("[object Object]", eval("arguments[0]()")); + assertEquals("[object Arguments]", eval("arguments[0]()")); with (arguments) { - assertEquals("[object Object]", toString()); + assertEquals("[object Arguments]", toString()); } }