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

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
This commit is contained in:
drbrain 2008-12-23 06:47:44 +00:00
parent 59641944e9
commit 1bd7257dc8
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Tue Dec 23 15:46:47 2008 Eric Hodel <drbrain@segment7.net>
* gem_prelude.rb: Match full RubyGems behavior when a gem can't be
found.
Tue Dec 23 15:36:58 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* tool/file2lastrev.rb: detects vcs directory properly on building

View file

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