2008/4/17, Stefan Lang <perfectly.normal.hacker / gmail.com>: > 2008/4/17, Iñáki Baz Castillo <ibc / aliax.net>: > > > 2008/4/17, Stefan Lang <perfectly.normal.hacker / gmail.com>: > Well, since Ruby doesn't support it, you must find other > ways to structure the code in each case. Exceptions might > help in the bigger picture, splitting it up in smaller methods, etc. > > You can use catch/throw for this: I would recommend using an "ordinary" exception - because that's what it is. var = ...something... case num when 1: raise "var invalid!" if var < 0 || var > 10 do_normal_stuff ... ... end_normal_stuff end puts "Write it" Kind regards robert -- use.inject do |as, often| as.you_can - without end