From: matz@... (Yukihiro Matsumoto) Date: 2000-06-20T01:29:30+09:00 Subject: [ruby-talk:03534] Re: Deep copy? Hi, In message "[ruby-talk:03516] Deep copy?" on 00/06/19, Hugh Sasse Staff Elec Eng writes: |Given that I cannot overload =, how should I go about ensuring a deep |copy of an object, as opposed to a shallow copy? There's no independent way to copy deeply. Only way I can think of is: copy = Marshal::load(Marshal::dump(obj)) This is not perfect; you cannot copy several data types such as IOs. But it handles cyclic data structures. matz.