mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/rational/lib/rational.rb: fix [Bug #1397].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7d4c34b9c6
commit
e814f14713
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Mar 29 17:38:24 2010 Keiju Ishitsuka <keiju@ruby-lang.org>
|
||||
|
||||
* ext/rational/lib/rational.rb: fix [Bug #1397].
|
||||
|
||||
Fri Mar 26 13:09:12 2010 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* eval.c (rb_eval): Use for() and make it a bit easier to read and
|
||||
|
|
|
@ -383,7 +383,7 @@ class Rational < Numeric
|
|||
# Converts the rational to a Float.
|
||||
#
|
||||
def to_f
|
||||
@numerator.to_f/@denominator.to_f
|
||||
@numerator.fdiv(@denominator)
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue