summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-11 20:19:29 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-11 20:19:29 +0900
commit8b27c23b5d55bd707a89bb5d95d2bdba9e132c1a (patch)
tree16debcefa70d9a81c14473bc0c3671ec4b1fbbcc /lib/rubygems/core_ext
parent9d3213ac856e1f5930bda555d4d65b173c6cdf83 (diff)
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
Diffstat (limited to 'lib/rubygems/core_ext')
-rw-r--r--lib/rubygems/core_ext/kernel_gem.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/rubygems/core_ext/kernel_gem.rb b/lib/rubygems/core_ext/kernel_gem.rb
index e722225..fb3053f 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