Skip to content

Commit 5a4ddb1

Browse files
author
Jeremy Bopp
committed
Assign exceptions to a variable rather than use $!
1 parent e1a0d13 commit 5a4ddb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net/ldap/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def open_connection(server)
4343
prepare_socket(server.merge(socket: TCPSocket.new(host, port)), true)
4444
return
4545
rescue Net::LDAP::Error, SocketError, SystemCallError,
46-
OpenSSL::SSL::SSLError
47-
errors << [$!, host, port]
46+
OpenSSL::SSL::SSLError => e
47+
errors << [e, host, port]
4848
end
4949
end
5050

0 commit comments

Comments
 (0)