1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

release monitor correctly.

* lib/rubygems/core_ext/kernel_require.rb: sometimes
  `Kernel.send(:gem, spec.name)` can raise some errors
  (Gem::MissingSpecError I observed) and this method
  doesn't release RUBYGEMS_ACTIVATION_MONITOR correctly.
  This patch fix this problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-04-20 15:02:55 +00:00
parent f14f0d3464
commit 1721dfa0ea

View file

@ -44,7 +44,12 @@ module Kernel
spec = Gem.find_unresolved_default_spec(path)
if spec
Gem.remove_unresolved_default_spec(spec)
Kernel.send(:gem, spec.name)
begin
Kernel.send(:gem, spec.name)
rescue Exception
RUBYGEMS_ACTIVATION_MONITOR.exit
raise
end
end
# If there are no unresolved deps, then we can use just try