From: Yoann Guillot Date: 2009-04-20T03:07:10+09:00 Subject: Re: ruby1.9 and the retry keyword On Mon, Apr 20, 2009 at 01:41:05AM +0900, Leo wrote: > > It seems that the 'retry' keyword is not supported anymore in ruby1.9 to > > restart a running iteration from the beginning. > > Are you sure you don't want to use 'redo'? > > $ ruby -ve '[1, 2].each { puts "bla" ; redo }' > ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-cygwin] > bla > bla > ... > redo reruns the current iteration, retry restarted the whole iteration [1, 2].each { |i| puts i ; redo if i == 2 } > 1 2 2 2 2 2 2 [1, 2].each { |i| puts i ; retry if i == 2 } > 1 2 1 2 1 2 1 -- Yoann