From: Guillaume Marcais Date: 2004-05-11T21:13:27+09:00 Subject: Re: RCR: Unique Object for Each source file Le 11 mai 04, � 07:38, Robert Klemme a �crit : > And then there is Kernel#load which already allows for wrapping in an > anonymous module: > http://www.ruby-doc.org/docs/rdoc/1.9/classes/Kernel.html#M001574 > > I'd rather suggest load to return the anonymous instance that was used > in > executing the code. That way, one can properly access all those > methods > defined in the file. And what about: def load(file, wrap=false) case wrap when Module: # Wrap in this module when true: # Wrap in an anonymous module and return it else # Load normally end Guillaume.