From: Charles Oliver Nutter Date: 2007-12-08T12:54:56+09:00 Subject: Re: Clarification of retry change Michal Suchanek wrote: > Hello > > When talking about the places where retry is allowed .. what does this > imply for retry inside if, case, and while? > > I do not really use retry nor am I familiar with the grammar trees you > keep talking about. Just want to remind that there are branching > constructs inside which the retry might make sense (when placed inside > a rescue). The scary thing is that what you're saying sounds totally sane, but retry has never worked that way. retry outside of a rescue body has always been a cross-method affair, causing the stack to unwind as many calls as necessary to get back to a call that accepts a block (and I think, unwind all the way back to the call that produced the block where retry is happening...whew!). So the places you're talking about would all be forbidden locations for retry in 1.9. What you want is redo, which already works for looping constructs and is quite normal and predictable. - Charlie