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 | 80084d5e72a542e663cdb49cf9a917b374fdf951 (patch) | |
| tree | 746208863e79a4fe2edc49b1035102932b8bc28d | |
| parent | bf0d826adab5ac09d0d822065d29da1e7b933c48 (diff) | |
| download | ruby-80084d5e72a542e663cdb49cf9a917b374fdf951.tar.gz ruby-80084d5e72a542e663cdb49cf9a917b374fdf951.tar.xz ruby-80084d5e72a542e663cdb49cf9a917b374fdf951.zip | |
* bignum.c (rb_big_coerce): allow bignum x bignum coercing.
[ruby-dev:26778]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | bignum.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -34,6 +34,11 @@ Tue Aug 9 15:12:04 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tkextlib/*: support to treat tkvariable-type configure options. +Tue Aug 9 20:30:19 2005 Tadashi Saito <shiba@mail2.accsnet.ne.jp> + + * bignum.c (rb_big_coerce): allow bignum x bignum coercing. + [ruby-dev:26778] + Mon Aug 8 20:43:02 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> * test/ruby/test_method.rb: added. [ruby-dev:26761] @@ -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)); |
