From: Austin Ziegler Date: 2002-11-12T04:58:33+09:00 Subject: Re: [FAQ] Why use 'include' On Tue, 12 Nov 2002 04:26:42 +0900, Eric Schwartz wrote: > I'm not sure what this example is intended to illustrate. It > certainly matches up with what I wrote. When the "require 'c'" > code is executed, it loads c.rb. The last statement of c.rb is > 'include M', which means that anybody 'require'ing c.rb will > automatically import all the classes and methods (and variables) > of module M into its current namespace. (Which I tried to indicate > is often a bad idea, as a module writer.) Actually, the problem I think Guy had with the way it was written was that it was "file"-based; his example shows that it's more object-scope based over file-based. -austin -- Austin Ziegler, austin@halostatue.ca on 2002.11.11 at 14.57.28