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
commit9bb7c219702f282ae139c0f149c9249c10626ccc (patch)
tree77e5140053d86428ff9201dee5bc67782d60203a /numeric.c
parent88b29643d99320a40e152c36787792c84df21aaf (diff)
* numeric.c (flo_divmod): round to the nearest integer. [ ruby-Bugs-14540 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@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 643a2cae80..93f569fd40 100644
--- a/numeric.c
+++ b/numeric.c
@@ -736,7 +736,7 @@ flo_divmod(x, y)
}
flodivmod(RFLOAT(x)->value, fy, &div, &mod);
if (FIXABLE(div)) {
- val = div;
+ val = round(div);
a = LONG2FIX(val);
}
else {