From 274c6471b870cb36475c9e6ca3ef6e82a8250187 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 7 May 2008 13:23:24 +0000 Subject: * 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 --- numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index ed8b3ff6b7..775f392e52 100644 --- a/numeric.c +++ b/numeric.c @@ -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: -- cgit v1.2.3