From: Joel VanderWerf Date: 2006-06-09T11:04:27+09:00 Subject: Re: Requiring a file into a different namespace Jacob Fugal wrote: ... > What I really want to know is this: Kernel#load allows a parameter > that wraps the loaded file in an anonymous module, so as not to > pollute the global namespace. But that anonymous module is discarded > -- as far as I can tell, the only use for this style of load is if the > only portion of the file you're interested in is the side effects. > > I suggest one of two changes. > > 1) Change Kernel#load to return the anonymous module when the wrap > parameter is true. Currently, the return value of Kernel#load is > always true (failure results in an exception), so there should be no > code relying on the current return value. Until then, http://raa.ruby-lang.org/project/script may be useful. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407