summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 11:30:01 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 15:12:46 +0900
commitd8148650f6b5d7855845cfa0d53b363366b5c460 (patch)
treec0c5a686f697aab68e2e51d187c30d51f97959cf
parent22d9bd944d4aae1b682e0bd4eafab706ff5a981e (diff)
Try to continue on LoadError with gem_original_require
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
index cbd92588c0..d121d82a85 100755
--- a/lib/rubygems/core_ext/kernel_require.rb
+++ b/lib/rubygems/core_ext/kernel_require.rb
@@ -54,8 +54,12 @@ module Kernel
end
if resolved_path
- RUBYGEMS_ACTIVATION_MONITOR.exit
- return gem_original_require(resolved_path)
+ begin
+ RUBYGEMS_ACTIVATION_MONITOR.exit
+ return gem_original_require(resolved_path)
+ rescue LoadError
+ RUBYGEMS_ACTIVATION_MONITOR.enter
+ end
end
if spec = Gem.find_unresolved_default_spec(path)