["a","b"].each do |name|
    sandbox = Module.new { require "#{name}.rb" }

    survey = sandbox::Survey.new

    puts survey.name
  end

This is what I'd like to do, but 'name' is out of scope and when I 
hardcode it, it seems like require is pulling class Survey from the file 
into the global namespace rather than the anonymous module's namespace. 
It's weird.

Anyone have a solution for requiring a file into a different namespace?

-- 
Posted via http://www.ruby-forum.com/.