1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2005-11-23 14:54:43 +00:00
parent 93402a2f17
commit 4f85b9edfb
2 changed files with 8 additions and 1 deletions

View file

@ -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> Wed Nov 23 22:34:15 2005 Kouhei Sutou <kou@cozmixng.org>
* lib/rss/parser.rb: added entity handling type predicate. * lib/rss/parser.rb: added entity handling type predicate.

View file

@ -243,6 +243,8 @@ num_quo(VALUE x, VALUE y)
} }
static VALUE num_floor(VALUE num);
/* /*
* call-seq: * call-seq:
* num.div(numeric) => integer * num.div(numeric) => integer
@ -255,7 +257,7 @@ num_quo(VALUE x, VALUE y)
static VALUE static VALUE
num_div(VALUE x, VALUE y) num_div(VALUE x, VALUE y)
{ {
return rb_Integer(rb_funcall(x, '/', 1, y)); return num_floor(rb_funcall(x, '/', 1, y));
} }