From: Charles Oliver Nutter Date: 2007-12-08T06:35:47+09:00 Subject: Re: Clarification of retry change Brian Mitchell wrote: > In these cases I could see it being confusing if retry didn't work in > the block but as a lexically dependent expression on rescue. This is > currently against the 1.8 behavior where the retry only refers to the > "some_array.each {|value| retry ...}" part. An example test for this > difference: You make a number of great points. I don't like retry in a block in a rescue anymore. > The eval case seems much more obscure. I would follow the rules given > for break and next inside eval and disallow retry (I think it already > works this way). I agree. I'm not a fan of flow control leaking outside eval in any case, and I don't see how it's actually useful as much as weird. > To me the location/scope of the retry expression doesn't matter as > much as the effect the retry has when run. Requiring retry to be _run_ > in the context of a rescue node (possibly at any level above the > running code) might make more sense. Agreed...it seems like retry should be bound to an immediately-enclosing rescue body. - Charlie