{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
This commit is contained in:
parent
1b1a1ed6c8
commit
728333dcd3
@ -1,3 +1,10 @@
|
|||||||
|
Sat Apr 30 14:25:55 2016 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* numeric.c (rb_int_modulo): {Fixnum,Bignum}#modulo is unified into
|
||||||
|
Integer.
|
||||||
|
|
||||||
|
* bignum.c (rb_big_modulo): Don't define Bignum#modulo.
|
||||||
|
|
||||||
Sat Apr 30 14:04:30 2016 Tanaka Akira <akr@fsij.org>
|
Sat Apr 30 14:04:30 2016 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* numeric.c (int_divmod): {Fixnum,Bignum}#divmod is unified into
|
* numeric.c (int_divmod): {Fixnum,Bignum}#divmod is unified into
|
||||||
|
10
bignum.c
10
bignum.c
@ -6126,15 +6126,6 @@ rb_big_idiv(VALUE x, VALUE y)
|
|||||||
return rb_big_divide(x, y, rb_intern("div"));
|
return rb_big_divide(x, y, rb_intern("div"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* call-seq:
|
|
||||||
* big % other -> Numeric
|
|
||||||
* big.modulo(other) -> Numeric
|
|
||||||
*
|
|
||||||
* Returns big modulo other. See Numeric.divmod for more
|
|
||||||
* information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_big_modulo(VALUE x, VALUE y)
|
rb_big_modulo(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
@ -6913,7 +6904,6 @@ Init_Bignum(void)
|
|||||||
rb_define_method(rb_cBignum, "/", rb_big_div, 1);
|
rb_define_method(rb_cBignum, "/", rb_big_div, 1);
|
||||||
rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
|
rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
|
||||||
rb_define_method(rb_cBignum, "div", rb_big_idiv, 1);
|
rb_define_method(rb_cBignum, "div", rb_big_idiv, 1);
|
||||||
rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);
|
|
||||||
rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1);
|
rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1);
|
||||||
|
|
||||||
rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
|
rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
|
||||||
|
@ -3494,7 +3494,7 @@ rb_int_idiv(VALUE x, VALUE y)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Document-method: Fixnum#%
|
* Document-method: Fixnum#%
|
||||||
* Document-method: Fixnum#modulo
|
* Document-method: Integer#modulo
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* fix % other -> real
|
* fix % other -> real
|
||||||
* fix.modulo(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, "/", fix_div, 1);
|
||||||
rb_define_method(rb_cFixnum, "div", fix_idiv, 1);
|
rb_define_method(rb_cFixnum, "div", fix_idiv, 1);
|
||||||
rb_define_method(rb_cFixnum, "%", fix_mod, 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, "divmod", int_divmod, 1);
|
||||||
rb_define_method(rb_cInteger, "fdiv", int_fdiv, 1);
|
rb_define_method(rb_cInteger, "fdiv", int_fdiv, 1);
|
||||||
rb_define_method(rb_cInteger, "**", rb_int_pow, 1);
|
rb_define_method(rb_cInteger, "**", rb_int_pow, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user