> > ri Class#=== doesn't exist for 1.8.0 (I'm on windows).
>
> Try Module#=== instead.

That worked. Thanks.

> #=== is really all about case statements, so it's already optimized for
> what you're trying to do. It'll do what you want if you just drop the
> call to #class:
>
>    case o
>    when Array
>      puts "Array"
>    else
>      puts "Something Else"
>    end
>

That clears things up. I was confused as to which #=== was called. A little
code to demonstrate your point:

irb(main):005:0> obj = Object.new
=> #<Object:0x282d2c8>
irb(main):006:0> def obj.===(other)
irb(main):007:1> puts "called"
irb(main):008:1> end
=> nil
irb(main):009:0> case obj
irb(main):010:1> when 1
irb(main):011:1> end
=> nil
irb(main):012:0> case 1
irb(main):013:1> when obj
irb(main):014:1> end
called
=> nil

This explains half of my question. Why does Object.new.class === Object
return true (instead of false like Array.new.class === Array)?

--
John Long
http://wiseheartdesign.com