From 635cff451ff4405ee8ad5c97d9b5b6a04435e0da Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 30 Apr 2016 08:27:30 +0000 Subject: Define Integer#remainder instead of Bignum#remainder. * numeric.c (int_remainder): Define Integer#remainder. * bignum.c (rb_big_remainder): Don't define Bignum#remainder. * internal.h (rb_big_remainder): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index 70aad22c1d..c23f439087 100644 --- a/bignum.c +++ b/bignum.c @@ -6128,16 +6128,7 @@ rb_big_modulo(VALUE x, VALUE y) return bignorm(z); } -/* - * call-seq: - * big.remainder(numeric) -> number - * - * Returns the remainder after dividing big by numeric. - * - * -1234567890987654321.remainder(13731) #=> -6966 - * -1234567890987654321.remainder(13731.24) #=> -9906.22531493148 - */ -static VALUE +VALUE rb_big_remainder(VALUE x, VALUE y) { VALUE z; @@ -6888,7 +6879,6 @@ Init_Bignum(void) rb_define_method(rb_cBignum, "*", rb_big_mul, 1); rb_define_method(rb_cBignum, "/", rb_big_div, 1); rb_define_method(rb_cBignum, "%", rb_big_modulo, 1); - rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1); rb_define_method(rb_cBignum, "==", rb_big_eq, 1); rb_define_method(rb_cBignum, ">", big_gt, 1); -- cgit v1.2.3