summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--enumerator.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 99d571a875..40e11d6bc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Mar 16 06:29:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c (lazy_init_iterator): no need to check overflow twice.
+
Fri Mar 16 05:47:09 2012 Eric Hodel <drbrain@segment7.net>
* enumerator.c (lazy_init_iterator): Fix type error (int vs long).
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();