diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 14:54:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 14:54:43 +0000 |
commit | 4f85b9edfbe5906ba69c36af0139d69d4f243706 (patch) | |
tree | 9ddd59638a26a5390523a1981b787805b62bfc42 /numeric.c | |
parent | 93402a2f179abbb89bca9337b85a420596cc7753 (diff) | |
download | ruby-4f85b9edfbe5906ba69c36af0139d69d4f243706.tar.gz |
* numeric.c (num_div): use floor rather than rb_Integer().
[ruby-dev:27674]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -243,6 +243,8 @@ num_quo(VALUE x, VALUE y) } +static VALUE num_floor(VALUE num); + /* * call-seq: * num.div(numeric) => integer @@ -255,7 +257,7 @@ num_quo(VALUE x, VALUE y) static VALUE num_div(VALUE x, VALUE y) { - return rb_Integer(rb_funcall(x, '/', 1, y)); + return num_floor(rb_funcall(x, '/', 1, y)); } |