summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-15 21:29:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-15 21:29:32 +0000
commit641e9e7bcea438c5c43b7863ae3afd380069e149 (patch)
treec9faf4e62fb44c550bc1f3c55e777f749a088eb3 /enumerator.c
parent25ac2aaf81e6fa4b0ce910af3853c98e5b046b25 (diff)
downloadruby-641e9e7bcea438c5c43b7863ae3afd380069e149.tar.gz
* enumerator.c (lazy_init_iterator): no need to check overflow twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c
index cd53201acb..f79bb06577 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1177,7 +1177,7 @@ lazy_init_iterator(VALUE val, VALUE m, int argc, VALUE *argv)
if (argc > 0) {
rb_ary_cat(args, argv, argc);
}
- result = rb_yield_values2(RARRAY_LENINT(args), RARRAY_PTR(args));
+ result = rb_yield_values2(len, RARRAY_PTR(args));
RB_GC_GUARD(args);
}
if (result == Qundef) rb_iter_break();