summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-20 08:39:12 (GMT)
commit8289771e326006cc4e15a667e3eff3a72cfb3327 (patch)
treef6d367888b42848fd6a660fad57fa2020e38c097 /gem_prelude.rb
parent40d8543fbdec5485a638a2cb1008089d106b978d (diff)
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index 997dae4..88ffe17 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -131,6 +131,7 @@ module Gem
Dir.entries(gems_directory).each do |gem_directory_name|
next if gem_directory_name == "." || gem_directory_name == ".."
dash = gem_directory_name.rindex("-")
+ next if dash.nil?
gem_name = gem_directory_name[0...dash]
current_version = GemVersions[gem_name]
new_version = calculate_integers_for_gem_version(gem_directory_name[dash+1..-1])
@@ -167,6 +168,7 @@ module Gem
def method_missing(method, *args, &block)
QuickLoader.load_full_rubygems_library
+ super unless Gem.respond_to?(method)
Gem.send(method, *args, &block)
end
end
@@ -174,9 +176,14 @@ module Gem
extend QuickLoader
end
-
-Gem.push_all_highest_version_gems_on_load_path
-$".unshift File.join(Gem::ConfigMap[:libdir], "ruby", Gem::ConfigMap[:ruby_version], "rubygems.rb")
+begin
+ Gem.push_all_highest_version_gems_on_load_path
+ $".unshift 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
+ puts e.backtrace.join("\n")
+end
#puts "Gem load in #{Time.now - t} seconds"
end # Gem::Enable \ No newline at end of file