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

* enumerator.c: use long for array indices.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2012-03-14 09:41:44 +00:00
parent 449c8a2ba3
commit 0d94434eca
2 changed files with 7 additions and 3 deletions

View file

@ -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.

View file

@ -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);