diff --git a/ChangeLog b/ChangeLog index 7f9cb69a01..9547a499d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Wed Mar 6 01:19:28 2013 Kazuhiro NISHIYAMA + + * 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 * class.c (rb_prepend_module): check redefinition of built-in optimized diff --git a/enumerator.c b/enumerator.c index 7143e37636..022690a2a3 100644 --- a/enumerator.c +++ b/enumerator.c @@ -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 { diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index dfb5daa527..414f124c44 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -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; diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c index c184c78663..72a1a6238d 100644 --- a/ext/fiddle/function.c +++ b/ext/fiddle/function.c @@ -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); } diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index 5e3094ee9f..2afa0cf595 100644 --- a/ext/openssl/ossl_x509store.c +++ b/ext/openssl/ossl_x509store.c @@ -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 */ diff --git a/process.c b/process.c index 34a38cb18e..48eee5dc75 100644 --- a/process.c +++ b/process.c @@ -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); diff --git a/transcode.c b/transcode.c index de9edf866a..de12c04f0f 100644 --- a/transcode.c +++ b/transcode.c @@ -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);