Testapi is reporting a failure with r35197: __FAIL__: MyObject - 0 should be NaN but instead is 1.
<rdar://problem/6079127>
*** Bug 18037 has been marked as a duplicate of this bug. ***
I think the test result here is correct. In the ECMA spec, subtraction uses ToNumber, not ToPrimitive, but the test file says this, where the second test is the failing test: shouldBe("+MyObject", 1); // toNumber ... shouldBe("MyObject - 0", NaN); // toPrimitive Addition uses ToPrimitive, and the result of the equivalent addition test may be wrong, but that's a different question.
Created attachment 28007 [details] Proposed patch
Comment on attachment 28007 [details] Proposed patch r=me, but i'd really like it if we could come up with something that would attempt a toPrimitive conversion -- possibly another custom object?
Fixed in r41896. I agree with your comment, Oliver.