summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-05 16:31:19 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-05 16:31:19 +0000
commitdbec401c115d12190143cf062515ad358d3a710f (patch)
tree9fbb2f324a871bb5c45d83efde773c5d1e282ca1 /enumerator.c
parent6520da6245b70169363e33aa929775a4f958d84e (diff)
downloadruby-dbec401c115d12190143cf062515ad358d3a710f.tar.gz
use INT2FIX(0) instead of INT2NUM(0).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c4
1 files changed, 2 insertions, 2 deletions
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 {