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

* bignum.c: added an alias (#magnitude).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-08-29 14:50:43 +00:00
parent 5185955f3f
commit a5bdf63afd
2 changed files with 3 additions and 0 deletions

View file

@ -15,6 +15,8 @@ Fri Aug 29 22:29:41 2008 Tadayoshi Funaba <tadf@dotrb.org>
* numeric.c: added an alias (#magnitude). * numeric.c: added an alias (#magnitude).
* bignum.c: ditto.
* test/ruby/test_complex.rb: added assertions. * test/ruby/test_complex.rb: added assertions.
* test/ruby/test_rational.rb: ditto. * test/ruby/test_rational.rb: ditto.

View file

@ -2710,6 +2710,7 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "hash", rb_big_hash, 0); 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, "to_f", rb_big_to_f, 0);
rb_define_method(rb_cBignum, "abs", rb_big_abs, 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, "size", rb_big_size, 0);
rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0); rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0);
rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0); rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0);