diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 10:14:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 10:14:42 +0000 |
commit | 88a4961cb2bf52186d188bb8feaed9465c8acddc (patch) | |
tree | 122bbc971d37cb761b214645e2e0b9b4414eab6f /bignum.c | |
parent | b2acbb2c67e8d9dc5eaf4823f5e547c57832c443 (diff) | |
download | ruby-88a4961cb2bf52186d188bb8feaed9465c8acddc.tar.gz |
* numeric.c (num_quo): should convert its operand to Rational.
* rational.c (string_to_r_strict): should raise TypeError.
* bignum.c (Init_Bignum): should not redefine Bignum#div.
Numeric#div will do. [ruby-dev:34066]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1737,7 +1737,6 @@ bigdivmod(VALUE x, VALUE y, VALUE *divp, VALUE *modp) /* * call-seq: * big / other => Numeric - * big.div(other) => Numeric * * Divides big by other, returning the result. */ @@ -1903,7 +1902,7 @@ static VALUE big_shift(VALUE x, int n) static VALUE rb_big_quo(VALUE x, VALUE y) { - return rb_funcall(rb_rational_raw1(x), '/', 1, y); + return rb_funcall(rb_rational_raw1(x), '/', 1, rb_Rational1(y)); } static VALUE @@ -2598,7 +2597,6 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "*", rb_big_mul, 1); rb_define_method(rb_cBignum, "/", rb_big_div, 1); rb_define_method(rb_cBignum, "%", rb_big_modulo, 1); - rb_define_method(rb_cBignum, "div", rb_big_div, 1); rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1); rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1); rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1); |