diff options
| author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-29 14:50:43 +0000 |
|---|---|---|
| committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-29 14:50:43 +0000 |
| commit | 72787fbaa06d1a4c252be8385163e6e5da80c2d8 (patch) | |
| tree | e42cfd491e8df442492a4436fa2201e5635f5de8 | |
| parent | b04deb52673061a534257a4705a5a3f59da472c7 (diff) | |
| download | ruby-72787fbaa06d1a4c252be8385163e6e5da80c2d8.tar.gz ruby-72787fbaa06d1a4c252be8385163e6e5da80c2d8.tar.xz ruby-72787fbaa06d1a4c252be8385163e6e5da80c2d8.zip | |
* bignum.c: added an alias (#magnitude).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | bignum.c | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -15,6 +15,8 @@ Fri Aug 29 22:29:41 2008 Tadayoshi Funaba <tadf@dotrb.org> * numeric.c: added an alias (#magnitude). + * bignum.c: ditto. + * test/ruby/test_complex.rb: added assertions. * test/ruby/test_rational.rb: ditto. @@ -2710,6 +2710,7 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "hash", rb_big_hash, 0); rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0); rb_define_method(rb_cBignum, "abs", rb_big_abs, 0); + rb_define_method(rb_cBignum, "magnitude", rb_big_abs, 0); rb_define_method(rb_cBignum, "size", rb_big_size, 0); rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0); rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0); |
