[MacRuby-devel] [MacRuby] #553: Fixnum Does Not Appear to Map to NSNumber
MacRuby
ruby-noreply at macosforge.org
Tue Feb 9 09:16:27 PST 2010
#553: Fixnum Does Not Appear to Map to NSNumber
-------------------------------+--------------------------------------------
Reporter: cwdinfo@… | Owner: lsansonetti@…
Type: enhancement | Status: closed
Priority: blocker | Milestone:
Component: MacRuby | Resolution: invalid
Keywords: |
-------------------------------+--------------------------------------------
Changes (by martinlagardette@…):
* status: new => closed
* resolution: => invalid
Comment:
Hi!
You will notice that MacRuby is actually already behaving the way you want
it to:
{{{
$ macirb --simple-prompt
>> i = 123
=> 123
>> i.class
=> Fixnum
>> n = NSNumber.numberWithInt(i)
=> 123
>> n.class
=> Fixnum
>> n.objCType #NSNumber method
=> "l"
>> n.unsignedIntValue #NSNumber method
=> 123
>> n.stringValue #NSNumber method
=> "123"
>> n.kind_of?(Fixnum)
=> true
>> n.kind_of?(NSNumber)
=> true
>>
}}}
:-)
--
Ticket URL: <http://www.macruby.org/trac/ticket/553#comment:1>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list