mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[rubygems/rubygems] LoadError#path
on the caught exception does not need to protect
a31f5d1a18
This commit is contained in:
parent
1a1b653c9c
commit
55aa1a206c
1 changed files with 8 additions and 8 deletions
|
@ -147,17 +147,17 @@ module Kernel
|
|||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
return gem_original_require(path)
|
||||
rescue LoadError => load_error
|
||||
RUBYGEMS_ACTIVATION_MONITOR.enter
|
||||
if load_error.path == path
|
||||
RUBYGEMS_ACTIVATION_MONITOR.enter
|
||||
|
||||
begin
|
||||
if load_error.path == path and Gem.try_activate(path)
|
||||
require_again = true
|
||||
begin
|
||||
require_again = Gem.try_activate(path)
|
||||
ensure
|
||||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
end
|
||||
ensure
|
||||
RUBYGEMS_ACTIVATION_MONITOR.exit
|
||||
end
|
||||
|
||||
return gem_original_require(path) if require_again
|
||||
return gem_original_require(path) if require_again
|
||||
end
|
||||
|
||||
raise load_error
|
||||
ensure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue