Permalink
Browse files

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
znz committed Mar 5, 2013
1 parent 6520da6 commit dbec401c115d12190143cf062515ad358d3a710f
Showing with 25 additions and 10 deletions.
  1. +15 −0 ChangeLog
  2. +2 −2 enumerator.c
  3. +1 −1 ext/bigdecimal/bigdecimal.c
  4. +2 −2 ext/fiddle/function.c
  5. +3 −3 ext/openssl/ossl_x509store.c
  6. +1 −1 process.c
  7. +1 −1 transcode.c
View
@@ -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
@@ -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 {
@@ -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
@@ -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);
}
@@ -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
@@ -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
@@ -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);

0 comments on commit dbec401

Please sign in to comment.