1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/purelib.rb
mame 63cbe555b7 * ext/purelib.rb, common.mk: to simulate ruby command more precisely,
remove "." from $: of virtual environment for build and test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-05 16:21:56 +00:00

17 lines
438 B
Ruby

nul = nil
$:.each_with_index {|path, index|
if /\A(?:\.\/)*-\z/ =~ path
nul = index
break
end
}
if nul
removed, $:[nul..-1] = $:[nul..-1], []
if defined?(Gem::QuickLoader)
removed.each do |path|
# replaces a fake rubygems by gem_prelude.rb with an alternative path
index = $".index(File.join(path, 'rubygems.rb'))
$"[index] = Gem::QuickLoader.path_to_full_rubygems_library if index
end
end
end