George Moschovitis wrote: > > the code works, I am wondering if there is a more elegant/efficient > way to write it. Well, I'd wonder why you're testing the class instead of the object. def myfunc(obj) case obj when Fixnum # ... when Float # ... else # ... end end myfunc(some_obj) This seems better to me... Hal