[MacRuby-devel] Getting a corrupt value reading an NSNumber unsignedLongLongValue
Caio Chassot
lists at caiochassot.com
Mon Dec 20 12:49:15 PST 2010
On 2010-12-20, at 16:37 , Caio Chassot wrote:
>
> Could someone try to reduce this and take the notification center and iTunes out of the picture and see if it's just a problem with NSNumber?
Oh, that was easier than I thought.
#!/usr/bin/env macruby
n = 0x8C2CACEFCD8BBABA
m = NSNumber.numberWithUnsignedLongLong n
puts "%016X" % n
puts "%016X" % m
puts "%016X" % m.unsignedLongLongValue
Gives:
8C2CACEFCD8BBABA
0C2CACEFCD8BBABA
0C2CACEFCD8BBABA
More information about the MacRuby-devel
mailing list