summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:26:52 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:26:52 (GMT)
commit728333dcd329a7dd5c423a2a2b564dc01312c9e0 (patch)
treec5506af86f0e64622601cdead4e90b7b1dccaaa2 /numeric.c
parent1b1a1ed6c8faeb41d4299dbbdd477713ab19e8b2 (diff)
{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 f291e3a..40d6139 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);