summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-10 08:00:19 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-10 08:00:19 (GMT)
commit5d613c83ccb6992c6b99e5a23512719604bbdae9 (patch)
tree8f1591102f7c8e1a27bd3c30b43567ced67e2519 /gem_prelude.rb
parentc12b28936266c205d174458f0bd21766154048f7 (diff)
Import RubyGems r1601. [ruby-core:15381].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index 63f979c..1b4ef44 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -166,7 +166,13 @@ module Gem
require_paths << File.join(path, "lib") if File.exist?(File.join(path, "lib"))
end
end
-
+
+ # "tag" the first require_path inserted into the $LOAD_PATH to enable
+ # indexing correctly with rubygems proper when it inserts an explicitly
+ # gem version
+ unless require_paths.empty?
+ 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
end