From 4d49ec8d3f96d2d675cbeb930bd548739e123240 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 11 Oct 2006 05:59:41 +0000 Subject: * array.c (rb_ary_each): prohibit array modification during each iteration. [ruby-core:09104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'array.c') diff --git a/array.c b/array.c index e488b556d2..3492f192aa 100644 --- a/array.c +++ b/array.c @@ -1245,6 +1245,42 @@ iter_unlock(VALUE ary) return ary; } +VALUE +each_internal(VALUE ary) +{ + long i; + + for (i=0; i array -- cgit v1.2.3