1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use INT2FIX(0) instead of INT2NUM(0).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2013-03-05 16:31:19 +00:00
parent 6520da6245
commit dbec401c11
7 changed files with 25 additions and 10 deletions

View file

@ -1,3 +1,18 @@
Wed Mar 6 01:19:28 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* enumerator.c (enumerator_with_index, lazy_take): use INT2FIX(0)
instead of INT2NUM(0).
* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
* ext/fiddle/function.c (function_call): ditto.
* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): ditto.
* process.c (proc_getsid): ditto.
* transcode.c (econv_finish): ditto.
Tue Mar 5 21:36:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* class.c (rb_prepend_module): check redefinition of built-in optimized

View file

@ -493,7 +493,7 @@ enumerator_with_index(int argc, VALUE *argv, VALUE obj)
rb_scan_args(argc, argv, "01", &memo);
RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_size);
if (NIL_P(memo))
memo = INT2NUM(0);
memo = INT2FIX(0);
return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)&memo);
}
@ -1742,7 +1742,7 @@ lazy_take(VALUE obj, VALUE n)
rb_raise(rb_eArgError, "attempt to take negative size");
}
if (len == 0) {
VALUE len = INT2NUM(0);
VALUE len = INT2FIX(0);
lazy = lazy_to_enum_i(obj, sym_cycle, 1, &len, 0);
}
else {

View file

@ -2669,7 +2669,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
}
if (infinite) {
if (negative) {
return ToValue(GetVpValueWithPrec(INT2NUM(0), prec, 1));
return ToValue(GetVpValueWithPrec(INT2FIX(0), prec, 1));
}
else {
Real* vy;

View file

@ -135,9 +135,9 @@ function_call(int argc, VALUE argv[], VALUE self)
if(NUM2INT(type) == TYPE_VOIDP) {
if(NIL_P(src)) {
src = INT2NUM(0);
src = INT2FIX(0);
} else if(cPointer != CLASS_OF(src)) {
src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
}
src = rb_Integer(src);
}

View file

@ -135,9 +135,9 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
ossl_x509store_set_vfy_cb(self, Qnil);
#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
rb_iv_set(self, "@flags", INT2NUM(0));
rb_iv_set(self, "@purpose", INT2NUM(0));
rb_iv_set(self, "@trust", INT2NUM(0));
rb_iv_set(self, "@flags", INT2FIX(0));
rb_iv_set(self, "@purpose", INT2FIX(0));
rb_iv_set(self, "@trust", INT2FIX(0));
#endif
/* last verification status */

View file

@ -4248,7 +4248,7 @@ proc_getsid(int argc, VALUE *argv)
rb_scan_args(argc, argv, "01", &pid);
if (NIL_P(pid))
pid = INT2NUM(0);
pid = INT2FIX(0);
sid = getsid(NUM2PIDT(pid));
if (sid < 0) rb_sys_fail(0);

View file

@ -3864,7 +3864,7 @@ econv_finish(VALUE self)
av[1] = dst;
av[2] = Qnil;
av[3] = Qnil;
av[4] = INT2NUM(0);
av[4] = INT2FIX(0);
ac = 5;
ret = econv_primitive_convert(ac, av, self);