summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 05:45:11 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 05:45:11 (GMT)
commit1777eaa523e48fa8023b0ab23e83f2c3187e62c5 (patch)
tree7ba6311ffa2dd3065572009f131d83610fd31439 /gem_prelude.rb
parente3897c538c27cf6c302972ee47f034ce909f0f45 (diff)
Use require to load rubygems.rb in gem_prelude.rb so the correct path is in on RubyGems upgrade.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index d2c54d3..93199b7 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -76,14 +76,20 @@ module Gem
end
module QuickLoader
-
+
class << self
def load_full_rubygems_library
- QuickLoader.instance_methods.each {|method_name| QuickLoader.send(:undef_method, method_name)}
- load "rubygems.rb"
+ QuickLoader.instance_methods.each do |method_name|
+ QuickLoader.send :undef_method, method_name
+ end
+
+ $".delete File.join(Gem::ConfigMap[:libdir], 'ruby',
+ Gem::ConfigMap[:ruby_version], 'rubygems.rb')
+
+ require 'rubygems'
end
end
-
+
GemPaths = {}
GemVersions = {}
@@ -176,9 +182,11 @@ module Gem
extend QuickLoader
end
+
begin
Gem.push_all_highest_version_gems_on_load_path
- $".unshift File.join(Gem::ConfigMap[:libdir], "ruby", Gem::ConfigMap[:ruby_version], "rubygems.rb")
+ $" << File.join(Gem::ConfigMap[:libdir], "ruby",
+ Gem::ConfigMap[:ruby_version], "rubygems.rb")
rescue Exception => e
puts "Error loading gem paths on load path in gem_prelude"
puts e