From: Ryan Davis Date: 2011-08-15T18:08:45+09:00 Subject: Re: How to use "case" to match class names? (=== not so funny) On Aug 14, 2011, at 08:47 , Iņaki Baz Castillo wrote: > klass = String > > case klass > when String > puts "I'm String class" > else > puts "I'm nothing..." > end case when String == klass then # ... else # ... end or to do a much cleaner version of the multi-match example above: case when [String, Whatever].include? klass then # ... else # ... end