From 8b27c23b5d55bd707a89bb5d95d2bdba9e132c1a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 11 Nov 2019 20:19:29 +0900 Subject: [PATCH] Try to revert the test failure with Ruby CI https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20191111T093005Z.fail.html.gz --- lib/rubygems/core_ext/kernel_gem.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/rubygems/core_ext/kernel_gem.rb b/lib/rubygems/core_ext/kernel_gem.rb index e722225739..fb3053fd83 100644 --- a/lib/rubygems/core_ext/kernel_gem.rb +++ b/lib/rubygems/core_ext/kernel_gem.rb @@ -61,13 +61,9 @@ module Kernel spec = dep.to_spec - if spec - if Gem::LOADED_SPECS_MUTEX.owned? - spec.activate - else - Gem::LOADED_SPECS_MUTEX.synchronize { spec.activate } - end - end + Gem::LOADED_SPECS_MUTEX.synchronize do + spec.activate + end if spec end private :gem