From: gotoken@... (GOTO Kentaro) Date: 2000-06-20T01:05:31+09:00 Subject: [ruby-talk:03518] Re: Deep copy? 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? I think there isn't general way. The meaning of deep copy depends on target object, so we have define such method for each class. Marshal.dump is another option, but not perfect. class Object def deep_copy Marshal.load(Marshal.dump(self)) end end Maybe, deep copy is not suitable operation for an object. -- gotoken