diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-12 18:41:31 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-12 18:41:31 +0000 |
commit | 8fd52acd7d22841cda421692f722c1e9bc789979 (patch) | |
tree | 468138a64cf6cc662e3242919f748ddbc0c4a235 /numeric.c | |
parent | 238eb6170cd3a626ddcdf1e05f16bef809601bde (diff) | |
download | ruby-8fd52acd7d22841cda421692f722c1e9bc789979.tar.gz ruby-8fd52acd7d22841cda421692f722c1e9bc789979.tar.xz ruby-8fd52acd7d22841cda421692f722c1e9bc789979.zip |
* numeric.c (flo_divmod): round to the nearest integer. [ ruby-Bugs-14540 ]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -715,7 +715,7 @@ flo_divmod(VALUE x, VALUE y) } flodivmod(RFLOAT(x)->value, fy, &div, &mod); if (FIXABLE(div)) { - val = div; + val = round(div); a = LONG2FIX(val); } else { |