1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
drbrain 2007-12-23 05:45:11 +00:00
parent e3897c538c
commit 1777eaa523
2 changed files with 18 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Sun Dec 23 14:43:10 2007 Eric Hodel <drbrain@segment7.net>
* gem_prelude.rb: Use require to load rubygems.rb so the correct path
is in $LOADED_FEATURES on RubyGems upgrade.
Sun Dec 23 11:26:43 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (sym_call): use exact argument array interface.

View file

@ -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