From: Greg Millam Date: 2002-12-09T00:53:35+09:00 Subject: Re: elseif? > pigeon% ruby -e 'case; when 12; puts 24; end' Another thing that would be neat to see, in my opinion, is a 'caseall' -- joe = 50 jane = 45 caseall when joe > jane puts "Joe is older than Jane" when jane > joe puts "Jane is older than Joe" when 40 < joe && joe < 60 puts "Joe is middle aged" when 40 < jane && jane < 60 puts "Jane is middle aged" else puts "Joe and Jane are the same age, and neither is middle aged" end -- In this case, it should print "Joe is older than Jane" "Joe is middle aged" "Jane is middle aged" The 'else' clause is only executed if none of the rest match. I've used a construct like that in other languages. While it's the same as a bunch of if statements, it is a bit cleaner. -Greg -- Greg Millam walker at deafcode.com