From: Phy Prabab Date: 2007-02-20T14:16:48+09:00 Subject: Re: How to find out object type --0-1850199232-1171948605=:59889 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable But that then would assume I know what the object might be. I mean, do I r= eally test for all primitive object types? Someone else sent the .cla= ss which will give a "hint" as to the class the object was created with. T= his seems to fit what I was looking for.=0A=0AMany thanks to all!=0APhy=0A= =0A----- Original Message ----=0AFrom: Daniel N =0ATo: r= uby-talk ML =0ASent: Monday, February 19, 2007 9:0= 1:44 PM=0ASubject: Re: How to find out object type=0A=0AOn 2/20/07, Phy Pra= bab wrote:=0A>=0A> umm, perhaps I am doing something = wrong:=0A>=0A> irb(main):005:0> o.kind_of(0)=0A> NoMethodError: undefined m= ethod `kind_of' for 123:Fixnum=0A> from (irb):5=0A> irb(main):006:0= > o.kind_of(1)=0A> NoMethodError: undefined method `kind_of' for 123:Fixnum= =0A> from (irb):6=0A> irb(main):007:0>=0A=0A=0Amethods may have pun= ctuation in ruby. kind_of?( OBJECT ) uses a question=0Amark.=0A=0AIt makes= it into a question. Effectively what happens as I understand it is=0Ayou = ask the object what kind of object are you?=0A=0Aeg=0A=0Ao.kind_of?( Fixnum= )=0A=0A=0A=0A=0A=0A=0A=0A =0A_____________________________________________= _______________________________________=0ASucker-punch spam with award-winn= ing protection. =0ATry the free Yahoo! Mail Beta.=0Ahttp://advision.webeven= ts.yahoo.com/mailbeta/features_spam.html --0-1850199232-1171948605=:59889--