summaryrefslogtreecommitdiff
path: root/lib/drb/ssl.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 16:11:12 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 16:11:12 +0000
commit4fd53e476e493630a140edc085c71f2670d74942 (patch)
tree07e4bd9801063ad1063e18ca564ed0b159ffc7d2 /lib/drb/ssl.rb
parent42ae24a6e86440d6e05faf81fb278a310aed71ef (diff)
* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
it may be set before the body. Reported by ko1 and mrkn. [ruby-core:59088] [Bug #9247] * lib/cgi/core.rb: Ditto. * lib/drb/ssl.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb/ssl.rb')
-rw-r--r--lib/drb/ssl.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb
index 82a9c7ce90a..78c0038abc2 100644
--- a/lib/drb/ssl.rb
+++ b/lib/drb/ssl.rb
@@ -328,8 +328,9 @@ module DRb
end
begin
ssl = @config.accept(soc)
- ensure
- soc.close if $!
+ rescue Exception
+ soc.close
+ raise
end
self.class.new(uri, ssl, @config, true)
rescue OpenSSL::SSL::SSLError