From: "Iñaki Baz Castillo" Date: 2008-04-15T09:06:26+09:00 Subject: Re: How to duplicate a object changing the class without attributes memory copy El Lunes, 14 de Abril de 2008, Gary Wright escribió: >  If you just do something like: > > from_obj.name = header_obj.name > > You are simply copying object references, you aren't > copying all the associated data. Hi, that's not true: if an attribute is a String then there will be memory copy: class Header attr_accessor :name end class From attr_accessor :name end header = Header.new header.name = "AAAA" => "AAAA" from = From.new from.name = header.name => "AAAA" from.name = "BBBB" => "BBBB" header.name => "AAAA" As you see in the example above if the attribute is a String (or a Fixnum and so) attribute copy means memory dupplication. Unfortunatelly in my case the attribute is a String. Regards. -- Iñaki Baz Castillo