In article 
<Pine.LNX.4.44.0212080116210.2040-100000 / candle.superlink.net>,
 dblack / candle.superlink.net wrote:

> Hi --
> 
> On Sun, 8 Dec 2002 nobu.nokada / softhome.net wrote:
> 
> > Hi,
> >
> > At Sun, 8 Dec 2002 06:18:52 +0900,
> > Joel VanderWerf wrote:
> > > x = 1.5
> > >
> >   case
> > >    when x < 0;             puts "x < 0"
> > >    when 0 <= x && x < 1;   puts "x in interval [0,1)"
> > >    when 1 <= x && x < 2;   puts "x in interval [1,2)"
> > >    when 2 <= x;            puts "x >= 2"
> > > end
> >
> > If no expression after "case", "when" clause evaled as true
> > will be executed.
> 
> Yet more proof of my theory, which is that as you work on a problem in
> Ruby, and it gets better and more idiomatic, code disappears from the
> screen.
> 


Oops, I think some more code just disappeared from my screen!!!

case 
   when x < 0;  puts "x < 0" 
   when x < 1;  puts "x in interval [0,1)"
   when x < 2;  puts "x in interval [1,2)" 
   else         puts "x >= 2"
end


Ross