aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 08:27:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 08:27:30 +0000
commit635cff451ff4405ee8ad5c97d9b5b6a04435e0da (patch)
tree426d5a90062c874ee8b90bbf4832e42ffa41c6db /bignum.c
parentae225a2ca84ea84da0c7c15ad07b9e89fbbb9392 (diff)
downloadruby-635cff451ff4405ee8ad5c97d9b5b6a04435e0da.tar.gz
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
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c12
1 files changed, 1 insertions, 11 deletions
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 <i>big</i> by <i>numeric</i>.
- *
- * -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);