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 | 8d464a9948f034160617b86aa5de43780e226f95 (patch) | |
tree | 468138a64cf6cc662e3242919f748ddbc0c4a235 /numeric.c | |
parent | 862cd3cd3c1c78dae69500fdae2be6abb63b72db (diff) | |
download | ruby-8d464a9948f034160617b86aa5de43780e226f95.tar.gz |
* numeric.c (flo_divmod): round to the nearest integer. [ ruby-Bugs-14540 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/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 { |