nice case for being more explicit and use parse* instead of conversion magic sometimes :D
Am Sonntag, 27. Januar 2013 03:31:21 UTC+1 schrieb Aseem Kishore: > > Found the issue -- indeed a bug fix: > > http://code.google.com/p/v8/issues/detail?id=2240 > > Sorry for the false alarm! But hopefully a useful heads-up for the Node > community. > > Aseem > > > > On Sat, Jan 26, 2013 at 9:28 PM, Aseem Kishore > <[email protected]<javascript:> > > wrote: > >> Safari and Firefox also seem to return NaN for this. So perhaps the bug >> in V8 was *not* returning them in the first place, and this is just a >> (breaking) bug *fix*. >> >> It's interesting that -0xC8 is a valid number in all this JS engines >> (equivalent to -200), but converting a *string* of that number returns NaN. >> Anyone have any idea why? >> >> Thanks! >> >> Aseem >> >> >> On Sat, Jan 26, 2013 at 9:25 PM, Aseem Kishore >> <[email protected]<javascript:> >> > wrote: >> >>> Hi guys, >>> >>> It seems that converting a negative hexadecimal string to a number, >>> using the unary + operator, has broken in Node 0.9. >>> >>> Node 0.4, 0.6, and 0.8: >>> >>> > +'-0xC8' >>> -200 >>> >>> Node 0.9: >>> >>> > +'-0xC8' >>> NaN >>> >>> Converting positive hexadecimal strings like this continues to work >>> properly. >>> >>> Chrome stable also behaves like this (returning NaN for negative >>> strings), so I'm guessing this is a V8 issue, but just wanted to share it >>> here too in case this is known. Is this a by-design change? >>> >>> Thanks much! >>> >>> Aseem >>> >>> >> > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
