>>>>> "W" == William Djaja Tjokroaminata <billtj / y.glue.umd.edu> writes: Write it like this W> module MyModule W> class MyClass W> end W> obj = MyClass.new W> puts "Using == it is OK" if obj.class == MyClass W> case obj.class case obj # it's shorter to write :-) W> when MyClass W> puts "Using case it is OK too" W> when MyModule::MyClass W> puts "Using case has to use the module name" W> else W> puts "The class name is #{obj.class}" W> end W> case obj.class.name W> when 'MyModule::MyClass' W> puts "Using case has to use the module and class names" W> end W> end Guy Decoux