From: transfire@... Date: 2006-06-09T02:56:04+09:00 Subject: Re: Requiring a file into a different namespace Jacob Fugal wrote: > On 6/7/06, transfire@gmail.com wrote: > > Use #load. Not tested but it will be something like: > > > > ["a","b"].each do |name| > > sandbox = Module.new { load "#{name}.rb" } > > > > survey = sandbox::Survey.new > > > > puts survey.name > > end > > Unfortunately, this won't work. You can't even do this directly: Ah crud. I actually meant: module_eval File.read("#{name}.rb") (I've made that booboo twice now!) Sorry about that. T.