[rubygems/rubygems] Remove ensure part in require
I've seen this error sometimes but never found it helpful, since the culprit has never been thread/monitor related, so it just adds noise. Right now I'm seeing an issue in CI where we seem to be crashing during ensure and showing a weird backtrace: ``` #<Thread:0x000055821d7a73b8 /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:167 run> terminated with exception (report_on_exception is true): /home/runner/work/rubygems/rubygems/lib/rubygems/platform.rb:141:in `==': undefined local variable or method `to_a' for false:FalseClass (NameError) Did you mean? to_s from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `!=' from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `require' from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:441:in `block in ensure_subdirectories' from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `each' from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `ensure_subdirectories' from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:413:in `ensure_gem_subdirectories' from /home/runner/work/rubygems/rubygems/lib/rubygems/resolver/specification.rb:110:in `download' from /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:173:in `block (2 levels) in install' ``` Let's get this out of the picture in case that helps clarify the culprit. https://github.com/rubygems/rubygems/commit/87ce40b70e
This commit is contained in:
parent
dd0f0a5e6e
commit
a47c54131d
@ -37,9 +37,6 @@ module Kernel
|
|||||||
return gem_original_require(path) unless Gem.discover_gems_on_require
|
return gem_original_require(path) unless Gem.discover_gems_on_require
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if RUBYGEMS_ACTIVATION_MONITOR.respond_to?(:mon_owned?)
|
|
||||||
monitor_owned = RUBYGEMS_ACTIVATION_MONITOR.mon_owned?
|
|
||||||
end
|
|
||||||
RUBYGEMS_ACTIVATION_MONITOR.enter
|
RUBYGEMS_ACTIVATION_MONITOR.enter
|
||||||
|
|
||||||
path = path.to_path if path.respond_to? :to_path
|
path = path.to_path if path.respond_to? :to_path
|
||||||
@ -163,13 +160,6 @@ module Kernel
|
|||||||
end
|
end
|
||||||
|
|
||||||
raise load_error
|
raise load_error
|
||||||
ensure
|
|
||||||
if RUBYGEMS_ACTIVATION_MONITOR.respond_to?(:mon_owned?)
|
|
||||||
if monitor_owned != (ow = RUBYGEMS_ACTIVATION_MONITOR.mon_owned?)
|
|
||||||
STDERR.puts [$$, Thread.current, $!, $!.backtrace].inspect if $!
|
|
||||||
raise "CRITICAL: RUBYGEMS_ACTIVATION_MONITOR.owned?: before #{monitor_owned} -> after #{ow}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user