From: Florian Gross Date: 2004-11-11T22:48:29+09:00 Subject: Re: array.each restart when array is changed Carlos wrote: >>Does 'retry' recall the method associated with its block? > > Yes, and re-evaluates its arguments (if any). > > Inside a method, it seems to recall the method (re-evaluating arguments) > only if the method has a block, altough you are not inside it. Didn't test > that much. Wow, this might be very powerful. Using it we can implement a custom while() without using a lambda for the condition: def _while(condition) if condition then yield retry end end i = 0 _while(i < 10) { i += 1 } i # => 10 I wonder if this is by purpose or an accidental feature. I think it would make some pretty interesting things possible if it can be relied on.