#584: BigMath.sqrt always returns NaN -------------------------------------+-------------------------------------- Reporter: hghoe...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+--------------------------------------
Comment(by maxime.curi...@…): The problem seems to be more of a general difference between ruby 1.8 and ruby 1.9, than a MacRuby-specific problem: # ruby -v => ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] {{{ >> require 'bigdecimal/math' => true >> BigMath.methods.include? :sqrt => false }}} # ruby -v => ruby 1.9.2dev (2010-01-26 trunk 26419) [i386-darwin10.2.0] {{{ >> require 'bigdecimal/math' => true >> BigMath.methods.include? :sqrt => false }}} #macruby -v => MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, i386] {{{ >> require 'bigdecimal/math' => true >> BigMath.methods.include? :sqrt => false }}} Since we are aiming to match Ruby 1.9's behavior, this is definitely something that should be fixed. In the mean time, users can go around the problem by:[[BR]] - either adding 'include BigMath' after "require 'bigdecimal/math'"[[BR]] - or using the instance method #sqrt on the object (i.e. "four.sqrt(10)")[[BR]] -- Ticket URL: <http://www.macruby.org/trac/ticket/584#comment:1> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel