From 80f54e68108a11447168d299f46abce461565f27 Mon Sep 17 00:00:00 2001 From: marcandre Date: Mon, 5 Sep 2011 21:45:25 +0000 Subject: * numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit platform part 1 of [bug #5276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33199 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 87afe14662..18f5e1cd1a 100644 --- a/numeric.c +++ b/numeric.c @@ -873,8 +873,8 @@ flo_mod(VALUE x, VALUE y) static VALUE dbl2ival(double d) { + d = round(d); if (FIXABLE(d)) { - d = round(d); return LONG2FIX((long)d); } return rb_dbl2big(d); -- cgit v1.2.3