ruby-changes:57122
From: Hiroshi <ko1@a...>
Date: Sat, 17 Aug 2019 15:13:11 +0900 (JST)
Subject: [ruby-changes:57122] Hiroshi SHIBATA: d8148650f6 (master): Try to continue on LoadError with gem_original_require
https://git.ruby-lang.org/ruby.git/commit/?id=d8148650f6 From d8148650f6b5d7855845cfa0d53b363366b5c460 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sat, 17 Aug 2019 11:30:01 +0900 Subject: Try to continue on LoadError with gem_original_require diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index cbd9258..d121d82 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -54,8 +54,12 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_require.rb#L54 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/