Skip to content

Commit d20ee69

Browse files
committed
ConnectionRefusedError does not change the original error message
1 parent 4f0f4b2 commit d20ee69

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/net/ldap/error.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ class AlreadyOpenedError < Error; end
1111
class SocketError < Error; end
1212
class ConnectionRefusedError < Error;
1313
def initialize(*args)
14-
warn warning_message
14+
warn_deprecation_message
1515
super
1616
end
1717

1818
def message
19-
warning_message + super
19+
warn_deprecation_message
20+
super
2021
end
2122

2223
private
23-
def warning_message
24-
"Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead. \n"
24+
def warn_deprecation_message
25+
warn "Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead."
2526
end
2627
end
2728
class NoOpenSSLError < Error; end

0 commit comments

Comments
 (0)