From 728333dcd329a7dd5c423a2a2b564dc01312c9e0 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 30 Apr 2016 05:26:52 +0000 Subject: {Fixnum,Bignum}#modulo is unified into Integer. * numeric.c (rb_int_modulo): {Fixnum,Bignum}#modulo is unified into Integer. * bignum.c (rb_big_modulo): Don't define Bignum#modulo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index f291e3a948..40d6139243 100644 --- a/numeric.c +++ b/numeric.c @@ -3494,7 +3494,7 @@ rb_int_idiv(VALUE x, VALUE y) /* * Document-method: Fixnum#% - * Document-method: Fixnum#modulo + * Document-method: Integer#modulo * call-seq: * fix % other -> real * fix.modulo(other) -> real @@ -4841,7 +4841,7 @@ Init_Numeric(void) rb_define_method(rb_cFixnum, "/", fix_div, 1); rb_define_method(rb_cFixnum, "div", fix_idiv, 1); rb_define_method(rb_cFixnum, "%", fix_mod, 1); - rb_define_method(rb_cFixnum, "modulo", fix_mod, 1); + rb_define_method(rb_cInteger, "modulo", rb_int_modulo, 1); rb_define_method(rb_cInteger, "divmod", int_divmod, 1); rb_define_method(rb_cInteger, "fdiv", int_fdiv, 1); rb_define_method(rb_cInteger, "**", rb_int_pow, 1); -- cgit v1.2.3