On Thursday 29 November 2007  05:46, Evan Phoenix wrote :
>
> The big question is that the behavior the user expects? Break in a block is 
> easy in rubinius because how calling blocks is implemented.
>
>> foo {
>>  ...
>>  retry
>>  ...
>> }
>>
>> can be rewritten as follows.
>>
>> retrying = true
>> while retrying
>>  retrying = false
>>  foo {
>>    ...
>>    retrying = true
>>    break
>>    ...
>>  }
>> end
>>
>> break can emulate retry.
>
> Yep, I've considered this for implementing retry. Again, it comes back to 
> why do we need it? If the user wants this behavior, why not have them code 
> it like that? the retry keyword in a block is a feature probably only 10 
> people have ever used and if you search for code which uses it, you'll find 
> almost none (the only instance I know of is in drb). retry in a block is 
> used much, much, much less often than File.exists?, yet File.exists? was 
> removed from 1.9. If we're in the mode of cleaning up cruft, I believe this 
> qualifies.
>
>  - Evan
>
>>
>> -- 
>> Tanaka Akira
>>
>
>

As far as I know File.exists? has only been deprecated and replaced by
File.exist?.

But I completly agree with your point of view. Retry keyword should only
be available in the 'try rescue' contruction simply because it's natural
and that nobody wants to suffer mind overloads looking at cabalistic
unused code constructions.