Math.round() rounds 0.5 up, and (0.51).toFixed(0) rounds up, but (0.5).toFixed(0) does not. This is inconsistent with other browsers and itself.
Created attachment 5444 [details] Patch for 5307, including test case From my interpretation (and Maciej's) of ECMA-262 Section 15.7.4.5, it looks like step 10 means to round the number. Hence, 0.5.toFixed(0) should indeed be 1.
Note: I do not believe that the summary for this bug is correct. (0.51).toFixed() does round up to 1, it is only 0.5 that is (was) not working. Hence, the summary should probably read "Number.toFixed doesn't round up for 0.5"
Comment on attachment 5444 [details] Patch for 5307, including test case r=me
Should really put in a test for -0.5 too.
*** Bug 9550 has been marked as a duplicate of this bug. ***