From: "F. Senault" Date: 2009-06-02T20:05:13+09:00 Subject: Re: <, >, and ranges in a case statement. Le 2 juin 2009 � 11:12, Max Williams a �crit : > category = case age > when < 12 : "child" > when 13..17 : "minor" > when 18..24 : "young ad*lt" > when 25..49 : "ad*lt" > when 50..64 : "middle aged" > when > 65 : "senior" > else : "not an age" > end As the others pointed out, there's no easy way to do what you want to. On the other hand, if you know the bounds of your inputs, your method isn't bad ; I'd write : category = case age when 0...12 then "child" when 12...18 then "minor" when 18...25 then "young ad*lt" when 25...50 then "ad*lt" when 50...65 then "middle aged" when 65...999 then "senior" else "not an age" end Note that the use of : within if's and case's has been deprecated in Ruby 1.9 and the next versions. Fred -- Home, home again I like to be here when I can When I come home cold and tired It's good to warm my bones besides the fire (Pink Floyd, Breathe Reprise)