Closed Bug 635009 Opened 9 years ago Closed 9 years ago

JSON.stringify should treat Boolean objects like ordinary boolean values

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 557371

People

(Reporter: jorendorff, Unassigned)

References

Details

We fail http://test262.ecmascript.org/ test 15.12.3_2-3-a-3.

JSON.stringify([{toString: function () { return Object(true); }}])
should return "[true]".

Instead we return "[{}]".

I checked the ES5 spec. The test is correct, we're wrong.
Blocks: es5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 557371
You need to log in before you can comment on or make changes to this bug.