From: Henry Maddocks Date: 2012-11-17T12:33:45+09:00 Subject: Re: Alternatives to methods for large number of nested "ifs" On 17/11/2012, at 11:41 AM, sto.mar@web.de wrote: > Am 16.11.2012 23:30, schrieb Henry Maddocks: >> >> 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 > > But throw/catch has nothing to do with exceptions. Sorry, language context switch failure. Henry