From: Matt Mower Date: 2004-12-13T16:32:07+09:00 Subject: Re: Abstracts and Interfaces in Ruby? On Mon, 13 Dec 2004 16:12:04 +0900, Nicholas Van Weerdenburg wrote: > On Mon, 13 Dec 2004 15:20:26 +0900, Miles Keaton 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/