From: Daniel Schierbeck Date: 2006-07-27T19:50:11+09:00 Subject: Symbols are your friends Yes, it's time for another Symbol trick! class Symbol def ===(obj) obj.respond_to? "to_#{self}" end end case "foo" when :int then "integer" when :str then "string" when :ary then "array" end #=> "string" Genius. Sheer genius. Daniel