From: Yehuda Katz Date: 2009-01-18T17:58:20+09:00 Subject: [ruby-core:21403] Re: Proposal: Module#copy_method --000e0cd3404e89fcd60460be066f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I see it as integrating with include/extend identically to alias/alias_method. The convoluted nature of this example should be counteracted by the fact that it's a *real* example. -- Yehuda On Sun, Jan 18, 2009 at 12:23 AM, Eero Saynatkari wrote: > Excerpts from Yehuda Katz's message of Sun Jan 18 09:26:19 +0200 2009: > > I'd like it to be possible to copy methods from one module to another. > The > > rationale is that this feature would make it possible to modify existing > > methods without being forced to resort to aliasing. > > Do you have an expanded use-case for this (copying in general)? > The chaining example seemed a bit convoluted, probably due to > having been distilled. > > If implemented, it should certainly actually copy the method, but > I am a bit unsure of its utility at the user code level. How well > do you see it integrating with normal #include/#extend semantics? > > > -- > Magic is insufficiently advanced technology. > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --000e0cd3404e89fcd60460be066f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I see it as integrating with include/extend identically to alias/alias_meth= od.

The convoluted nature of this example should be coun= teracted by the fact that it's a *real* example.

-- Yehuda

On Sun, Jan 18, 2009 at 12= :23 AM, Eero Saynatkari <ruby-ml@kittensoft.org> wrote:
Excerpts from Yehuda Katz's message of Sun Jan 18 09:26:19 +0200 2009:<= br>
> I'd like it to be possible to copy methods f= rom one module to another. The
> rationale is that this feature would make it possible to modify existi= ng
> methods without being forced to resort to aliasing.

Do you have an expanded use-case for this (copying in general)?
The chaining example seemed a bit convoluted, probably due to
having been distilled.

If implemented, it should certainly actually copy the method, but
I am a bit unsure of its utility at the user code level. How well
do you see it integrating with normal #include/#extend semantics?


--
Magic is insufficiently advanced technology.




--
Yehuda Katz
D= eveloper | Engine Yard
(ph) 718.877.1325
--000e0cd3404e89fcd60460be066f--