aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-20 15:02:55 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-20 15:02:55 +0000
commit0bd9ec5d9abf0f092ad3c64c555fca568ea5516e (patch)
treeaddd29684ba6c0d7c221a26320b1fffbb9b649c4 /lib
parent7440d9951b9dfce4b7a3ae1af1fc17e60a5b2d95 (diff)
downloadruby-0bd9ec5d9abf0f092ad3c64c555fca568ea5516e.tar.gz
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
Diffstat (limited to 'lib')
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
index 71a301c323..3172ef9be6 100755
--- a/lib/rubygems/core_ext/kernel_require.rb
+++ b/lib/rubygems/core_ext/kernel_require.rb
@@ -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