summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-04 04:31:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-04 04:31:33 +0000
commit8ff71e339442f9bedfa17a8f3781c89187ee394d (patch)
tree6448711f10de49e5cae0bd6c3f8531c3cac90b6d /numeric.c
parent86793f1d39f427932afb7e2a9417b11d37cb2589 (diff)
downloadruby-8ff71e339442f9bedfa17a8f3781c89187ee394d.tar.gz
ruby-8ff71e339442f9bedfa17a8f3781c89187ee394d.tar.xz
ruby-8ff71e339442f9bedfa17a8f3781c89187ee394d.zip
* numeric.c (fix_div): should not convert the result into
integer. [ruby-core:05524] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8905 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 ec01d6926..fcf0ba1a7 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2155,7 +2155,7 @@ fix_div(x, y)
x = rb_int2big(FIX2LONG(x));
return rb_big_div(x, y);
case T_FLOAT:
- return rb_Integer(rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value));
+ return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
default:
return rb_num_coerce_bin(x, y);
}