summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-29 14:50:43 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-29 14:50:43 +0000
commita5bdf63afd3fedbd902cfa3ec0bfdb17ea83d35c (patch)
treee42cfd491e8df442492a4436fa2201e5635f5de8 /bignum.c
parent5185955f3f64d53f55e34bfe4eaf059b7b347fc4 (diff)
* bignum.c: added an alias (#magnitude).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index e9b7726dd3..14b9b1b762 100644
--- a/bignum.c
+++ b/bignum.c
@@ -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);