From: Martin DeMello Date: 2002-12-08T06:56:52+09:00 Subject: Re: elseif? Joel VanderWerf wrote: > x = 1.5 > > case true > 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 > > Sorta like cond in lisp... Nice!! You should add it to the RubyIdioms wiki page. martin