From: "David A. Black" Date: 2005-11-17T04:32:24+09:00 Subject: Re: Proposed RCR: Object#replace Hi -- On Thu, 17 Nov 2005, Trans wrote: >> i see where you are coming from, but wouldn't this more accurately be called >> something like Object#refer since all instance vars will then be shared? > > class Object > def replace(other) > other.instance_variables.each do |name| > o = other.instance_variable_get(name) > if o.respond_to? :clone > instance_variable_set(name, o.clone) > end > end > end > end How does instance variable duplication qualify as the general meaning of "replace"? It's not even part of the existing replace methods. David -- David A. Black dblack@wobblini.net