* ruby.c (ruby_init_loadpath_safe): mark initial load paths.

* gem_prelude.rb (push_all_highest_version_gems_on_load_path):
  search insertion position by initial load path mark.

* lib/rubygems.rb (Gem.load_path_insert_index): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-03-12 15:11:10 +00:00
parent 614619031b
commit 04e68d0107
5 changed files with 17 additions and 21 deletions

View file

@ -267,7 +267,7 @@ if defined?(Gem) then
require_paths.first.instance_variable_set(:@gem_prelude_index, true)
end
# gem directories must come after -I and ENV['RUBYLIB']
$:[$:.index(ConfigMap[:sitelibdir]),0] = require_paths
$:[$:.index{|e|e.instance_variable_defined?(:@gem_prelude_index)}||-1,0] = require_paths
end
def const_missing(constant)