From: Michael Randall Date: 2009-10-27T05:11:46+09:00 Subject: Re: Array#collect in a method call, not working for me Michael Linfield wrote: >> But does that mean that (a = [1, 2].class) is setting a to be an Array? > Consider this: >>> n = [] > => [] >>> a = n.class > => Array >>> a << 1 > NoMethodError: undefined method `<<' for Array:Class > > a doesn't become an array, it becomes the class type of Array. > Regards, > - Mac That makes sense. And I don't know why I didn't think to do the following to test it myself... irb(main):061:0> n = [] => [] irb(main):062:0> a = n.class => Array irb(main):063:0> a.class => Class THANKS!! -- Posted via http://www.ruby-forum.com/.