diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-10 01:37:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-10 01:37:25 +0000 |
commit | 9b421423669a6f4b639a372d019f2add60a260b0 (patch) | |
tree | 746208863e79a4fe2edc49b1035102932b8bc28d /bignum.c | |
parent | 38a63b25bc3c23b918ff486b1637cd8c6f24d223 (diff) |
* bignum.c (rb_big_coerce): allow bignum x bignum coercing.
[ruby-dev:26778]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1969,6 +1969,9 @@ rb_big_coerce(x, y) if (FIXNUM_P(y)) { return rb_assoc_new(rb_int2big(FIX2LONG(y)), x); } + else if (TYPE(y) == T_BIGNUM) { + return rb_assoc_new(y, x); + } else { rb_raise(rb_eTypeError, "can't coerce %s to Bignum", rb_obj_classname(y)); |