Robert Klemme wrote:
> I think this is not limited to modules but to *all* situations in Ruby
> where you can redefine existing things (classes, methods, instance methods
> etc.) and where this is done in different places that don't know anything
> about each other.  But since this feature is mentioned as one of the
> strengths of Ruby ("flexibility") most of the time, I'd say apparently
> it's not a problem.  After all, most of us around here are aware of this
> and it doesn't stop us from using Ruby, does it? :-)
Well, I must tell I wasn't aware of this until recently. But that's 
true, I won't stop using ruby for that. But there is a thing that seems 
strange to me with that fact.

When using extend, the extension act _only_ for the instance. Here is a 
sample code:
module Thing
	def test
		print "in Thing\n"
	end
end

class Stuff
	def test
		print "in Stuff\n"
	end
end

thing = Stuff.new
stuff = Stuff.new
thing.test
stuff.test
thing.extend(Thing)
thing.test
stuff.test

Which output:
in Stuff
in Stuff
in Thing
in Stuff

If extend can mix in a module in the class of an instance and be 
available only for that instance, why requiring wouldn't be local to the 
module where require is called? Or at least only its class 
redefinitions? (same remark for include)

Lio