>     class Object
>       def replace(other)
>         other.instance_variables.each do |name|
>           instance_variable_set(name, other.instance_variable_get(name))
>         end
>       end
>     end

I don't like this a whole lot.  It breaks encapsulation big time.  If
other is a completely different object, this could be putting this
object into a strange state.

I'm not sure if there is a good general way to do this #replace with
breaking encapsulation.  Maybe using something in Marshal may help. 
Or what's the big deal about just having each class make its own
#replace?