From: Pit Capitain Date: 2007-03-01T04:36:39+09:00 Subject: Re: Ruby's "case" doesn't behave like a normal switch gga schrieb: > For completeness sake, you can also emulate C's lack of a break; > statement in ruby by doing redo/retry, like: > > a = 1 > > catch(:redo) do > case a > when 1 > print '1' > a = 2 > redo > when 2 > puts 'and 2' > end > end > > This makes ruby's case statement probably the best of any language. I didn't know the "catch(:redo)". Is this documented somewhere? Regards, Pit