aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:26:52 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:26:52 +0000
commitc0f1bd575db573c54573ab2c7c6d727e6903a8af (patch)
treec5506af86f0e64622601cdead4e90b7b1dccaaa2 /numeric.c
parent54552be912f03084ac53e6354c4795a3bbd8eb2a (diff)
downloadruby-c0f1bd575db573c54573ab2c7c6d727e6903a8af.tar.gz
{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
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
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);