diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-26 11:47:14 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-26 11:47:14 +0000 |
commit | 8f045eddb2dcd171b98a4dd6b018441acf4b1048 (patch) | |
tree | 8c7291b6f8b3dc6e7d2e820bcfcb70ca8616fb56 /bignum.c | |
parent | 05bd6f83690ccd9cec4728cd23a4a66c995abcc2 (diff) | |
download | ruby-8f045eddb2dcd171b98a4dd6b018441acf4b1048.tar.gz |
{Fixnum,Bignum}#size is unified into Integer.
* numeric.c (int_size): {Fixnum,Bignum}#size is unified into Integer.
* bignum.c (rb_big_size_m): Don't define Bignum#size.
* internal.h (rb_big_size_m): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -6902,19 +6902,7 @@ rb_big_size(VALUE big) return BIGSIZE(big); } -/* - * call-seq: - * big.size -> integer - * - * Returns the number of bytes in the machine representation of - * <i>big</i>. - * - * (256**10 - 1).size #=> 12 - * (256**20 - 1).size #=> 20 - * (256**40 - 1).size #=> 40 - */ - -static VALUE +VALUE rb_big_size_m(VALUE big) { return SIZET2NUM(rb_big_size(big)); @@ -7043,7 +7031,6 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "<", big_lt, 1); rb_define_method(rb_cBignum, "<=", big_le, 1); rb_define_method(rb_cBignum, "===", rb_big_eq, 1); - rb_define_method(rb_cBignum, "size", rb_big_size_m, 0); #ifdef USE_GMP /* The version of loaded GMP. */ |