aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-27 11:56:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-27 11:56:03 +0000
commitd5a7299bca633621789db8ff76665d0caee80918 (patch)
tree0c71b9a6291d3c2b407e44d63f220777d7478308 /bignum.c
parente5b436cd76961741a3ba59e3c825f0b6e17864cb (diff)
downloadruby-d5a7299bca633621789db8ff76665d0caee80918.tar.gz
{Fixnum,Bignum}#[] is unified into Integer.
* numeric.c (int_aref): {Fixnum,Bignum}#[] is unified into Integer. * bignum.c (rb_big_aref): Don't define Bignum#<<. * internal.h (rb_big_aref): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/bignum.c b/bignum.c
index 61ef401098..7cdc863d84 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6771,26 +6771,7 @@ rb_big_rshift(VALUE x, VALUE y)
}
}
-/*
- * call-seq:
- * big[n] -> 0, 1
- *
- * Bit Reference---Returns the <em>n</em>th bit in the (assumed) binary
- * representation of <i>big</i>, where <i>big</i>[0] is the least
- * significant bit.
- *
- * a = 9**15
- * 50.downto(0) do |n|
- * print a[n]
- * end
- *
- * <em>produces:</em>
- *
- * 000101110110100000111000011110010100111100010111001
- *
- */
-
-static VALUE
+VALUE
rb_big_aref(VALUE x, VALUE y)
{
BDIGIT *xds;
@@ -7006,7 +6987,6 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "|", rb_big_or, 1);
rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
rb_define_method(rb_cBignum, "~", rb_big_neg, 0);
- rb_define_method(rb_cBignum, "[]", rb_big_aref, 1);
rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
rb_define_method(rb_cBignum, ">", big_gt, 1);