aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--numeric.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1053f65e45..1812bc7e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/numeric.c b/numeric.c
index 634cde20b3..08685718a4 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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));
}