But that then would assume I know what the object might be. I mean, do
I really test for all primitive object types? Someone else sent the
.class which will give a “hint” as to the class the object was
created with. This seems to fit what I was looking for.
Many thanks to all!
On 2/20/07, Phy P. [email protected] wrote:
umm, perhaps I am doing something wrong:
NoMethodError: undefined method
kind_of' for 123:Fixnum from (irb):5 irb(main):006:0> o.kind_of(1) NoMethodError: undefined methodkind_of’ for 123:Fixnum
methods may have punctuation in ruby. kind_of?( OBJECT ) uses a
It makes it into a question. Effectively what happens as I understand
you ask the object what kind of object are you?
o.kind_of?( Fixnum )