[MacRuby-devel] [MacRuby] #553: Fixnum Does Not Appear to Map to NSNumber

MacRuby ruby-noreply at macosforge.org
Tue Jan 12 14:24:12 PST 2010


#553: Fixnum Does Not Appear to Map to NSNumber
-------------------------------+--------------------------------------------
 Reporter:  cwdinfo@…          |       Owner:  lsansonetti@…        
     Type:  enhancement        |      Status:  new                  
 Priority:  blocker            |   Milestone:                       
Component:  MacRuby            |    Keywords:                       
-------------------------------+--------------------------------------------
 In the context of Cocoa Bindings, Fixnum should "magically" convert to
 NSNumber much as String becomes NSString. Example:

 {{{
 irb(main):001:0> i = 123.to_i
 => 123
 irb(main):002:0> i.class
 => Fixnum
 irb(main):003:0> n = NSNumber.numberWithInt(i)
 => 123
 irb(main):004:0> n.class
 => Fixnum
 }}}

 See project: http://github.com/sxross/MacRuby-Array-Cocoa-Array-Binding/

 for a more concrete example of why this is important.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/553>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list