summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 11:31:28 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 11:31:28 (GMT)
commite27a06f4bbf0723cd19a943c41dff3125ed0a69d (patch)
tree876cf0e0b019cf102c9a248ca63b0444413fcc62 /numeric.c
parent25f2c8506639cdeb7be55879b7e9aa432b8be265 (diff)
Define Integer#% instead of Bignum#%.
* numeric.c (rb_int_modulo): Define Integer#%. * bignum.c (rb_big_modulo): Don't define Bignum#%. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 50c13b8..c20ce4f 100644
--- a/numeric.c
+++ b/numeric.c
@@ -4943,6 +4943,7 @@ Init_Numeric(void)
rb_define_method(rb_cFixnum, "/", fix_div, 1);
rb_define_method(rb_cInteger, "div", rb_int_idiv, 1);
rb_define_method(rb_cFixnum, "%", fix_mod, 1);
+ rb_define_method(rb_cInteger, "%", rb_int_modulo, 1);
rb_define_method(rb_cInteger, "modulo", rb_int_modulo, 1);
rb_define_method(rb_cInteger, "remainder", int_remainder, 1);
rb_define_method(rb_cInteger, "divmod", int_divmod, 1);