Y
Yoann Guillot
Hi
It seems that the 'retry' keyword is not supported anymore in ruby1.9 to
restart a running iteration from the beginning.
Is there a way to achieve the old behavior, preferably in a 1.8 compatible
way ?
$ ruby1.8 -ve '[1, 2].each { puts "bla" ; retry }'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
bla
bla
bla
^C
$ ruby1.9 -ve '[1, 2].each { puts "bla" ; retry }'
ruby 1.9.2dev (2009-04-19) [i686-linux]
-e:1: Invalid retry
-e: compile error (SyntaxError)
It seems that the 'retry' keyword is not supported anymore in ruby1.9 to
restart a running iteration from the beginning.
Is there a way to achieve the old behavior, preferably in a 1.8 compatible
way ?
$ ruby1.8 -ve '[1, 2].each { puts "bla" ; retry }'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
bla
bla
bla
^C
$ ruby1.9 -ve '[1, 2].each { puts "bla" ; retry }'
ruby 1.9.2dev (2009-04-19) [i686-linux]
-e:1: Invalid retry
-e: compile error (SyntaxError)