[MacRuby-devel] [MacRuby] #638: NSCFNUmber.to_f doesn't work correctly
MacRuby
ruby-noreply at macosforge.org
Sun Mar 28 08:34:08 PDT 2010
#638: NSCFNUmber.to_f doesn't work correctly
-------------------------------------+--------------------------------------
Reporter: jordan.breeding@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
-------------------------------------+--------------------------------------
{{{
41 jordan at thetourist ~/Misc/Scripts/macruby_plus_scripting_bridge >
macruby -e 'puts("%.2f" % [NSNumber.numberWithInt(5).to_f / 2])'
/Users/jordan/Misc/Scripts/macruby_plus_scripting_bridge/-e:1:in `<main>':
can't convert NSCFNumber to Float (NSCFNumber#to_f gives NSCFNumber)
(TypeError)
42 jordan at thetourist ~/Misc/Scripts/macruby_plus_scripting_bridge >
macruby -e 'puts("%.2f" % [5.to_f / 2])'
2.50
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/638>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list