El Lunes, 14 de Abril de 2008, Gary Wright escribi=F3:
> =A0If you just do something like:
>
> from_obj.name =3D 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=
=20
copy:

class Header
  attr_accessor :name
end

class From
  attr_accessor :name
end

header =3D Header.new
header.name =3D "AAAA"
=3D> "AAAA"

from =3D From.new
from.name =3D header.name
=3D> "AAAA"

from.name =3D "BBBB"
=3D> "BBBB"

header.name
=3D> "AAAA"


As you see in the example above if the attribute is a String (or a Fixnum a=
nd=20
so) attribute copy means memory dupplication. Unfortunatelly in my case the=
=20
attribute is a String.

Regards.





=2D-=20
I=F1aki Baz Castillo