From: "Ara.T.Howard" Date: 2005-11-17T09:15:52+09:00 Subject: Re: Proposed RCR: Object#replace On Thu, 17 Nov 2005, Austin Ziegler wrote: > does. Yes, I think it should be that restrictive -- exact match only. This > isn't #become, it's #replace. This isn't typecasting, it's replacing the > internals of one object with those of another object OF THE EXACT SAME KIND. > (Granted, singleton objects tend to confuse things, but this is closer to > the behaviour of #dup than of #clone.) The behaviour for this is relatively > well-established by the #replace implementations on the internal objects > Array, Hash, and String. i like the idea. why not make it more generic and have semantics for a class Object def reinitialize other = self ... end end paradigm/hook. a copy ctor sort of thing. ?? -a -- =============================================================================== | ara [dot] t [dot] howard [at] gmail [dot] com | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================