summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:43:15 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-30 05:43:15 (GMT)
commit73dd745cf1c742d62d8662ef69ec13ec7c30924f (patch)
treeddb41cd95d7e24eaae2d831f3dc14c4207242c62 /numeric.c
parent728333dcd329a7dd5c423a2a2b564dc01312c9e0 (diff)
{Fixnum,Bignum}#div is unified into Integer.
* numeric.c (rb_int_idiv): {Fixnum,Bignum}#div is unified into Integer. * bignum.c (rb_big_idiv): Don't define Bignum#div. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 40d6139..9254545 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3466,11 +3466,11 @@ fix_div(VALUE x, VALUE y)
}
/*
- * Document-method: Fixnum#div
+ * Document-method: Integer#div
* call-seq:
- * fix.div(numeric) -> integer
+ * int.div(numeric) -> integer
*
- * Performs integer division: returns integer result of dividing +fix+ by
+ * Performs integer division: returns integer result of dividing +int+ by
* +numeric+.
*/
@@ -4839,7 +4839,7 @@ Init_Numeric(void)
rb_define_method(rb_cFixnum, "-", fix_minus, 1);
rb_define_method(rb_cFixnum, "*", fix_mul, 1);
rb_define_method(rb_cFixnum, "/", fix_div, 1);
- rb_define_method(rb_cFixnum, "div", fix_idiv, 1);
+ rb_define_method(rb_cInteger, "div", rb_int_idiv, 1);
rb_define_method(rb_cFixnum, "%", fix_mod, 1);
rb_define_method(rb_cInteger, "modulo", rb_int_modulo, 1);
rb_define_method(rb_cInteger, "divmod", int_divmod, 1);