From: Charles Oliver Nutter Date: 2007-12-07T14:48:09+09:00 Subject: Re: Clarification of retry change SASADA Koichi wrote: > Hi, > > Charles Oliver Nutter wrote: >> Matz confirmed that retry-outside-rescue will no longer work, but I >> wanted to make one clarification... > > Should I remove from retry feature from YARV? That's what I gathered from Matz's reply on ruby-talk: > OK, even though I am not fully agreed with you in some edge corner, we > see no specific benefit to keep retry outside of rescue. I and Koichi > talked about this issue, and agreed to remove it in 1.9. I guess he > would do it in a day or two, hopefully. > > matz. ko1 again: > And more. > > begin > # body > rescue > 1.times{ > retry # (4) > } > end > > begin > # body > rescue > 1.times{ > eval("retry") # (5) > } > end > > > What should be done with (4) and (5)? I would think they should be "rescue retries" in both cases, and bubble out to the rescue block, or they should also be disallowed. I don't know which would be more consistent, but I can see valid uses for the block form: begin # body rescue some_array.each {|value| retry if value.is_not_something?} end Perhaps eval should stop retries in most cases? eval clouds expected behavior for me. - Charlie