From: Gary Wright Date: 2007-02-20T14:11:45+09:00 Subject: Re: How to find out object type On Feb 20, 2007, at 12:01 AM, 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 > irb(main):003:0* o.class > => Fixnum > irb(main):004:0> #{o}.class The #{} notation is only applicable inside a string: "#{o}". The way you are using it make the line look like a comment. Everything after the # is simply discarded. Maybe you are looking for something like: a = 123 b = [o] p b # [123] Gary Wright