From: "Peña, Botp" Date: 2008-04-18T09:45:00+09:00 Subject: Re: How to "break" a "case-when" ? From: Iñaki Baz Castillo [mailto:ibc@aliax.net] # var = ...something... # case num # when 1: # if ( var < 0 || var > 10 ) # puts "var not valid !!!!!" # break # end # do_normal_stuff # ... # ... # end_normal_stuff # end # puts "Write it" #.... # Yes, but what I was trying to avoid is to enclose all the "real" stuff # ni a "if" stament since it's in fact the default behaviour and that # will be executed 99% of times. # Anyway I understand that is the only way. how about another case way, var = ...something... case when num==1 and ( var < 0 || var > 10 ) puts "var not valid for num==1 !!!!!" when other_stuff_condition when .... ... else else_stuff end puts "Write it" kind regards -botp