diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | numeric.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Nov 23 23:52:35 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * numeric.c (num_div): use floor rather than rb_Integer(). + [ruby-dev:27674] + Wed Nov 23 22:34:15 2005 Kouhei Sutou <kou@cozmixng.org> * lib/rss/parser.rb: added entity handling type predicate. @@ -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)); } |