summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--enumerator.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3055bf9..233c426 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Mar 14 18:40:36 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c: use long for array indices.
+
Wed Mar 14 18:25:18 2012 Shugo Maeda <shugo@ruby-lang.org>
* enumerator.c: moved the comment of StopIteration.
diff --git a/enumerator.c b/enumerator.c
index ad301a9..3176b5f 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1258,7 +1258,7 @@ lazy_flat_map_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
if (TYPE(result) == T_ARRAY) {
- int i;
+ long i;
for (i = 0; i < RARRAY_LEN(result); i++) {
rb_funcall(argv[0], id_yield, 1, RARRAY_PTR(result)[i]);
}
@@ -1351,7 +1351,7 @@ static VALUE
lazy_zip_func_i(VALUE val, VALUE arg, int argc, VALUE *argv)
{
VALUE yielder, ary, v, result;
- int i;
+ long i;
yielder = argv[0];
ary = rb_ary_new2(RARRAY_LEN(arg) + 1);
@@ -1369,7 +1369,7 @@ static VALUE
lazy_zip_func(VALUE val, VALUE arg, int argc, VALUE *argv)
{
VALUE yielder, ary, v;
- int i;
+ long i;
yielder = argv[0];
ary = rb_ary_new2(RARRAY_LEN(arg) + 1);