diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 05:26:52 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 05:26:52 +0000 |
commit | 728333dcd329a7dd5c423a2a2b564dc01312c9e0 (patch) | |
tree | c5506af86f0e64622601cdead4e90b7b1dccaaa2 /numeric.c | |
parent | 1b1a1ed6c8faeb41d4299dbbdd477713ab19e8b2 (diff) | |
download | ruby-728333dcd329a7dd5c423a2a2b564dc01312c9e0.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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |