Is this a bug? Shouldn't 'require' load both modules in this case? If not, what is the motivation for doing so? Just curious :-) -- Simon Strandgaard server> ls a.rb server> expand -t2 a.rb require 'fileutils' code = <<RUBY puts "hello" RUBY FileUtils.mkdir("dir") File.open("mod.rb", "w+") do |f| f.write <<-RUBY puts "hello1" RUBY end FileUtils.cd("dir") do File.open("mod.rb", "w+") do |f| f.write <<-RUBY puts "hello2" RUBY end end require 'mod' $:.unshift('dir') require 'mod' server> ruby a.rb hello1 server> ls a.rb dir/ mod.rb server> I would have expected it to output both 'hello1' and 'hello2'.