What is the difference between
case item.class when MyClass # do something here when Array # do something different here when String # do a third thing end and
case item.class when MyClass.class # do something here when Array.class # do something different here when String.class # do a third thing end For some reason, the first one of these works sometimes and the second doesn't, and other times, the second one works and the first one doesn't. Why? Which one is the "proper" way to do it?
MyClass === objuses the Module#=== method to check ifobjis an instance ofMyClass.