From: Leslie Viljoen Date: 2006-05-23T22:56:22+09:00 Subject: Re: How to "go to" in a RUBY script . . . On 5/23/06, Kirk Haines wrote: > On Monday 22 May 2006 6:04 pm, Louis J Scoras wrote: > > count,iterations = catch(:bailout) {do_iterations} > puts "Bailed out after #{count} iterations.\nIterations: > #{iterations.inspect}" > ----- > > catch/throw don't need to be used often, but when they are needed, they work > great for all of the same thing that labeled loops in Perl work for, and then > some. > This is great! It's exactly the way I was "abusing" exceptions, so I'm going to change my code to use catch and throw instead. Les