On Tue, 14 Dec 2004 00:57:20 +0900, Robert Klemme <bob.news / gmx.net> wrote: > > "Nicholas Van Weerdenburg" <vanweerd / gmail.com> schrieb im Newsbeitrag > news:632154f7041213075134ba5f70 / mail.gmail.com... > > > > On Mon, 13 Dec 2004 16:32:07 +0900, Matt Mower <matt.mower / gmail.com> > wrote: > > > On Mon, 13 Dec 2004 16:12:04 +0900, Nicholas Van Weerdenburg > > > > > > > > > <vanweerd / gmail.com> wrote: > > > > On Mon, 13 Dec 2004 15:20:26 +0900, Miles Keaton > <mileskeaton / gmail.com > wrote: > > > > > > > > For example, you can extend the Enumerable modules, and your changes > > > > apply to all objects in the system that use Enumerable: > > > > > > > > module Enumerable > > > > def each > > > > raise "you must implement each" > > > > end > > > > end > > > > > > > > > > Would this not introduce a breakage? IIRC the search order for > > > methods is object->modules->baseclass->baseclass modules. > > > > > > Hence if you mixed Enumerable into an object whose base class > > > imlemented #each you would *hide* the base-class implementation. > > > > > > Or have I got it wrong? (I'm still a learner). > > > > > > Regards, > > > > > > Matt > > > > > > -- > > > Matt Mower :: http://matt.blogs.it/ > > > > > > > > > > Good point. It was not a well thought out example. > > No, not a good point. See my other posting. > > Regards > > robert > > I misread your other posting. Trying in irb, I see there is no breakage. Thanks, Nick -- Nicholas Van Weerdenburg