summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-12 18:41:31 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-12 18:41:31 +0000
commit8d464a9948f034160617b86aa5de43780e226f95 (patch)
tree468138a64cf6cc662e3242919f748ddbc0c4a235 /numeric.c
parent862cd3cd3c1c78dae69500fdae2be6abb63b72db (diff)
* 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index dbe273bbcf..d9466daa91 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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 {