2008/4/17, Stefan Lang <perfectly.normal.hacker / gmail.com>:

> break is only for iteration. What are you trying to do?
>  The example you've given is not a compelling use case,
>  since you can simply remove the line after break.

Ok, I write a better example:


  var = ...something...

 case num
  when 1:
    puts "var not valid !!!!!" if ( var < 0 || var > 10 )
    break
    do_normal_stuff
    ...
    ...
    end_normal_stuff
  end

  puts "Write it"


I just want do_normal_stuff in case "var" is valid.
Yes, I can put a big "if" stament and so but I would like not to do it
since it makes a bit ugly the code.


-- 
IƱaki Baz Castillo
<ibc / aliax.net>