mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c (fix_divide): float division should floor() before
rounding into integer. [ruby-dev:34584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ffd4bf96cc
commit
274c6471b8
2 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,11 @@ Wed May 7 20:19:18 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
|||
after Init_prelude() because cannot load encoding extensions before
|
||||
it.
|
||||
|
||||
Wed May 7 19:30:34 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* numeric.c (fix_divide): float division should floor() before
|
||||
rounding into integer. [ruby-dev:34584]
|
||||
|
||||
Wed May 7 18:02:01 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (sym_to_i): remove obsolete method. preparation for
|
||||
|
|
|
@ -2260,7 +2260,7 @@ fix_divide(VALUE x, VALUE y, ID op)
|
|||
return DOUBLE2NUM(div);
|
||||
}
|
||||
else {
|
||||
return rb_dbl2big(div);
|
||||
return rb_dbl2big(floor(div));
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue