[MacRuby-devel] [MacRuby] #280: NSNumber#decimalValue cant convert to ruby object

MacRuby ruby-noreply at macosforge.org
Tue Apr 20 19:22:06 PDT 2010


#280: NSNumber#decimalValue cant convert to ruby object
--------------------------------------+-------------------------------------
 Reporter:  matt.whiteside@…          |       Owner:  lsansonetti@…        
     Type:  defect                    |      Status:  new                  
 Priority:  blocker                   |   Milestone:                       
Component:  MacRuby                   |    Keywords:                       
--------------------------------------+-------------------------------------

Old description:

> macirb
> >> framework 'foundation'
> => true
> >> NSNumber.numberWithFloat(1.2)
> => #<NSCFNumber:0x800053a60>
> >> NSNumber.numberWithFloat(1.2).decimalValue
> ArgumentError: can't convert C/Objective-C value `0x7fff5fbf94a0' of type
> `b8' to Ruby object
>         from (irb):3:in `decimalValue'

New description:

 {{{
 $> macirb
 >> framework 'Foundation'
 => true
 >> NSNumber.numberWithFloat(1.2)
 => 1.20000004768372
 >> NSNumber.numberWithFloat(1.2).decimalValue
 TypeError: unrecognized runtime type `b8'
         from /private/tmp/(irb):3:in `<main>'
 >>
 }}}

--

Comment(by martinlagardette@…):

 Still a problem as of r3946

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/280#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list