summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 15:11:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 15:11:10 (GMT)
commit04e68d0107460575a86cc427338eae436be16286 (patch)
tree21d6239b192f81e58fdfd09959e613dffd79ce9a /gem_prelude.rb
parent614619031b6d34d12f7bf2752c24eadefb9a8f8f (diff)
* 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
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index fac6a38..5928356 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -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)