From: Austin Ziegler Date: 2007-02-20T22:05:32+09:00 Subject: Re: How to find out object type On 2/20/07, Phy Prabab wrote: > Got it. thanks! I'm not sure you do. > On 2/20/07, Phy Prabab wrote: > > ah, thats better. So now for the real nubie question, I am lost as to why this does not work: > > > > irb(main):001:0> o = 123 > > => 123 > > irb(main):002:0> #{o} = Array.new This won't work. The "#{o}" notation only works in string interpolation. Outside of strings (and string-like constructors like Regexp literal notations), # acts as a comment. So both of your examples were no-ops. Your understanding of Ruby's syntax and philosophy bit you here. I think that you need to look around for comments about "duck typing"; I'd look very closely at some of the tutorials available on the web before you go much further. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca