Got it. thanks!
···
----- Original Message ----
From: Harold Hausman <hhausman@gmail.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Monday, February 19, 2007 9:09:47 PM
Subject: Re: How to find out object type
On 2/20/07, Phy Prabab <phyprabab@yahoo.com> 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
irb(main):005:0*
irb(main):006:0* ^C
irb(main):006:0>I was hoping to be create an array from the numb stored as "o", but this must be wrong,
because trying to get the class of the object does not work. Any help?
irb(main):001:0> o = 42
=> 42
irb(main):002:0> the_o_array = [o]
=> [42]
irb(main):003:0> the_o_array.class
=> Array
hth,
-Harold
____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.