Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed require to rethrow the original exception after attempting a …

…gem load.

git-svn-id: svn+ssh://rubyforge.org/var/svn/rubygems/trunk@744 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
commit 84aa8c121246cd3c30e5ab358018da958b47e484 1 parent 8ca72e8
@jimweirich jimweirich authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 rubygems/lib/rubygems/custom_require.rb
View
4 rubygems/lib/rubygems/custom_require.rb
@@ -16,14 +16,14 @@ module Kernel
#
def require(path)
require__ path
- rescue LoadError
+ rescue LoadError => load_error
begin
@gempath_searcher ||= Gem::GemPathSearcher.new
if spec = @gempath_searcher.find(path)
Gem.activate(spec.name, true, "= #{spec.version}")
require__ path
else
- raise LoadError, "No such file to load -- #{path}"
+ raise load_error
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.