From: James Edward Gray II Date: 2005-12-13T10:49:22+09:00 Subject: Re: Idiom wanted: do-while On Dec 12, 2005, at 7:36 PM, Steve Litt wrote: > 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. Which is probably a sign that method calls are needed. Heck, I think two programmers working on the same loop is a sign of that. ;) James Edward Gray II