Projects

Ticket #638 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

NSCFNUmber.to_f doesn't work correctly

Reported by: jordan.breeding@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

41 jordan@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@thetourist ~/Misc/Scripts/macruby_plus_scripting_bridge > macruby -e 'puts("%.2f" % [5.to_f / 2])'
2.50

Change History

Changed 5 months ago by lsansonetti@…

Seems 10.6 only.

Changed 5 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.6

Apparently this is fixed in trunk.

Note: See TracTickets for help on using tickets.