On 17/11/2012, at 7:15 AM, Brian Candler wrote:



> But if you must keep it within the same scope (lots of local variables 
> as you say, that you don't want to pass as arguments), then throw/catch 
> is another option.
> 
> lots of code
> .
> .
> catch(:done) do
>  throw :done unless ...
>  some lines of code
>  throw :done unless ...
>  some lines of code
> end


Don't use exceptions for flow control.

Henry