check monitor is owning for debug

This commit is contained in:
Koichi Sasada 2019-11-12 04:03:33 +09:00
parent 99be207c2a
commit a815053a3e

View File

@ -157,6 +157,11 @@ module Kernel
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