Subject: Re: Array#find!
From: Andre Nathan <andre digirati.com.br>
Date: Sat, 1 Mar 2008 11:11:01 +0900
References: 293063293066
In-reply-to: 293066
On Sat, 2008-03-01 at 10:15 +0900, 7stud -- wrote:
> arr.each_with_index do |elmt, i|
> if elmt == 2
> arr.delete_at(i)
> break
> end
> end
This won't work in 1.9: "RuntimeError: can't modify array during
iteration".
Best,
Andre