From: Joel VanderWerf Date: 2002-12-08T12:58:32+09:00 Subject: Re: elseif? Martin DeMello wrote: > 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. But I've never actually used it. :)