No Numeric#fdiv method in 1.8 mode ---------------------------------- Key: JRUBY-5083 URL: http://jira.codehaus.org/browse/JRUBY-5083 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.5.2 Environment: any Reporter: Hiroshi Nakamura Assignee: Hiroshi Nakamura
1.fdiv(2) raises NoMthodError. {noformat} % jruby -e 'p 1.fdiv(2)' -e:1: undefined method `fdiv' for 1:Fixnum (NoMethodError) #=> should be 0.5 % jruby --1.9 -e 'p 1.fdiv(2)' 0.5 #=> OK 0% ruby -ve 'p 1.fdiv(2)' ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] 0.5 #=> p72 already has Numeric#fdiv {noformat} Numeric#fdiv is an alias of Numeric#quo in 1.8. (NB: not the same in 1.9) >From 1.8.7 p302 (not yet imported), Rational#coerce invokes Numeric#fdiv >instead of Float#fdiv so '1.0 + Rational(1, 2)' corrupts after updating >lib/ruby/1.8/rational.rb to p302 version. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email