diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:59:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:59:02 +0000 |
commit | 8a2df1ce3f143b49d43b3899692c6ed559b6d53c (patch) | |
tree | 08913b0c034536b9712c9084b1531fba25e57286 /bignum.c | |
parent | d73b431e5068f2b5a2c696dca6d84a8c394602b1 (diff) | |
download | ruby-8a2df1ce3f143b49d43b3899692c6ed559b6d53c.tar.gz |
{Fixnum,Bignum}#** is unified into Integer.
* numeric.c (rb_int_pow): {Fixnum,Bignum}#** is unified into
Integer.
* bignum.c (rb_big_pow): Don't define Bignum#**.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -6296,19 +6296,6 @@ rb_big_fdiv(VALUE x, VALUE y) return DBL2NUM(dx / dy); } -/* - * call-seq: - * big ** exponent -> numeric - * - * Raises _big_ to the _exponent_ power (which may be an integer, float, - * or anything that will coerce to a number). The result may be - * a Fixnum, Bignum, or Float - * - * 123456789 ** 2 #=> 15241578750190521 - * 123456789 ** 1.2 #=> 5126464716.09932 - * 123456789 ** -2 #=> 6.5610001194102e-17 - */ - VALUE rb_big_pow(VALUE x, VALUE y) { @@ -6950,7 +6937,6 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1); rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1); rb_define_method(rb_cBignum, "fdiv", rb_big_fdiv, 1); - rb_define_method(rb_cBignum, "**", rb_big_pow, 1); rb_define_method(rb_cBignum, "==", rb_big_eq, 1); rb_define_method(rb_cBignum, ">", big_gt, 1); |