On Monday 12 December 2005 05:42 pm, James Edward Gray II wrote:

> > Is there a ruby idiom for do-while?
>
> I favor:
>
> loop do
>    # ... some action ...
>    break unless ...
> end

I do this quite a bit, but it's not structured programming and is a little 
like a goto. Break can improve readability on small loops, but on large loops 
maintained by multiple people it can become a nightmare.

SteveT
 
Steve Litt
http://www.troubleshooters.com
slitt / troubleshooters.com