diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:27:20 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:27:20 +0000 |
commit | 10fb4e151d4b053c1adf2363b278ec37a49497da (patch) | |
tree | abf8125cceee78d483ee2f2186041ab8feac35bc /bignum.c | |
parent | b296cacb123cd0bbf9ca1efae66f1fcb7c1caae0 (diff) | |
download | ruby-10fb4e151d4b053c1adf2363b278ec37a49497da.tar.gz |
{Fixnum,Bignum}#~ is unified into Integer.
* numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into
Integer.
* bignum.c (rb_big_neg): Don't define Bignum#~.
* internal.h (rb_big_neg): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -5546,19 +5546,7 @@ rb_big_uminus(VALUE x) return bignorm(z); } -/* - * call-seq: - * ~big -> integer - * - * Inverts the bits in big. As Bignums are conceptually infinite - * length, the result acts as if it had an infinite number of one - * bits to the left. In hex representations, this is displayed - * as two periods to the left of the digits. - * - * sprintf("%X", ~0x1122334455) #=> "..FEEDDCCBBAA" - */ - -static VALUE +VALUE rb_big_neg(VALUE x) { VALUE z = rb_big_clone(x); @@ -6963,7 +6951,6 @@ Init_Bignum(void) 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_neg, 0); rb_define_method(rb_cBignum, "==", rb_big_eq, 1); rb_define_method(rb_cBignum, ">", big_gt, 1); |