aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-26 11:47:14 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-26 11:47:14 +0000
commit8f045eddb2dcd171b98a4dd6b018441acf4b1048 (patch)
tree8c7291b6f8b3dc6e7d2e820bcfcb70ca8616fb56 /bignum.c
parent05bd6f83690ccd9cec4728cd23a4a66c995abcc2 (diff)
downloadruby-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.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/bignum.c b/bignum.c
index 5ce95eea16..335304204e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -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. */