[前][次][番号順一覧][スレッド一覧]

ruby-changes:58722

From: Koichi <ko1@a...>
Date: Tue, 12 Nov 2019 04:03:52 +0900 (JST)
Subject: [ruby-changes:58722] a815053a3e (master): check monitor is owning for debug

https://git.ruby-lang.org/ruby.git/commit/?id=a815053a3e

From a815053a3ea16382bea8b420a3070b4da3c3bb94 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Tue, 12 Nov 2019 04:03:33 +0900
Subject: check monitor is owning for debug


diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
index f0409d6..dfceb75 100644
--- a/lib/rubygems/core_ext/kernel_require.rb
+++ b/lib/rubygems/core_ext/kernel_require.rb
@@ -157,6 +157,11 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_require.rb#L157
     return gem_original_require(path) if require_again
 
     raise load_error
+  ensure
+    if RUBYGEMS_ACTIVATION_MONITOR.mon_owned?
+      pp $!
+      raise "CRITICAL: RUBYGEMS_ACTIVATION_MONITOR is holding."
+    end
   end
 
   private :require
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]