diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-15 21:29:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-15 21:29:32 +0000 |
commit | 641e9e7bcea438c5c43b7863ae3afd380069e149 (patch) | |
tree | c9faf4e62fb44c550bc1f3c55e777f749a088eb3 | |
parent | 25ac2aaf81e6fa4b0ce910af3853c98e5b046b25 (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | enumerator.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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(); |