Damjan Rems wrote in post #1076429:

> I understand the difference between << an += operator but shouldn't
> clone method make a duplicate of object a, without any link to original
> object.

a.clone duplicate the object 'a' , but each elements of the array are 
not
cloned.



Doing b[0] << '1' you affect an object which is referenced by a
but   b << '1'    you affect the structure of b, which do not impact a

Regard,

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