unknown wrote:
> WKC CCC <wai-kee.chung / uk.bnpparibas.com> wrote:
> 
>> 
>>   count = count + 1
>> end
>> 
>> puts one.inspect
> 
> Array.new(array) copies the *array* but it does not copy its *elements*.
> So tempArr[0] is another name for the very same object as one[0], and so
> forth. m.

If they are referring to the same object, why is it when

tempArr = Array.new(one)
one.clear

results in tempArr still having the values originally assigned to array 
one?

Thanks,

-- 
Posted via http://www.ruby-forum.com/.