On Monday 11 October 2004 06:04 am, George Moschovitis wrote:| def myfunc(klass)|     case klass.name|         when Fixnum.name|             puts :Fixnum|         when Float.name|             puts :Float|         ...|         default|             puts :Object|     end| end
This doesn't work?
    def myfunc(klass)          case klass              when Fixnum                    puts :Fixnum              when Float                    puts :Float              ...              default                    puts :Object        end    end

BTW the method being used by case in the above is Class#===, to be more exact it is calling Fixnum#=== and Float#===
T.