#553: Fixnum Does Not Appear to Map to NSNumber
-------------------------------+--------------------------------------------
 Reporter:  cwdi...@…          |        Owner:  lsansone...@…        
     Type:  enhancement        |       Status:  closed               
 Priority:  blocker            |    Milestone:                       
Component:  MacRuby            |   Resolution:  invalid              
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by martinlagarde...@…):

  * 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/>

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to