summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-23 06:47:44 (GMT)
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-23 06:47:44 (GMT)
commit1bd7257dc8884d7cdd80e2a2b551b9016c3b9ddd (patch)
tree09e85ca5ea3a6610c8c59e57b2c88913eed0d8ce /gem_prelude.rb
parent59641944e9902912fbbe81c57504f35d652b9ad6 (diff)
Match full RubyGems behavior when a gem can't be found
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index becf626..553912c 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -18,6 +18,9 @@ if defined?(Gem) then
module Gem
+ class LoadError < ::LoadError
+ end
+
ConfigMap = {
:sitedir => RbConfig::CONFIG["sitedir"],
:ruby_version => RbConfig::CONFIG["ruby_version"],
@@ -183,13 +186,13 @@ if defined?(Gem) then
begin
require 'rubygems/defaults/operating_system'
- rescue LoadError
+ rescue ::LoadError
end
if defined?(RUBY_ENGINE) then
begin
require "rubygems/defaults/#{RUBY_ENGINE}"
- rescue LoadError
+ rescue ::LoadError
end
end
ensure
@@ -228,7 +231,7 @@ if defined?(Gem) then
def push_gem_version_on_load_path(gem_name, *version_requirements)
if version_requirements.empty?
unless GemPaths.has_key?(gem_name)
- raise LoadError.new("Could not find RubyGem #{gem_name} (>= 0)\n")
+ raise Gem::LoadError.new("Could not find RubyGem #{gem_name} (>= 0)\n")
end
# highest version gems already active