Skip to content

Commit 5bcde6e

Browse files
author
Tom Maher
committed
MaxSaslChallenges => MAX_SASL_CHALLENGES, because it's a constant and Rubocop
1 parent 944ea47 commit 5bcde6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/net/ldap/auth_adapter/sasl.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Net
44
class LDAP
55
class AuthAdapter
66
class Sasl < Net::LDAP::AuthAdapter
7-
MaxSaslChallenges = 10
7+
MAX_SASL_CHALLENGES = 10
88

99
#--
1010
# Required parameters: :mechanism, :initial_credential and
@@ -49,7 +49,7 @@ def bind(auth)
4949
end
5050

5151
return pdu unless pdu.result_code == Net::LDAP::ResultCodeSaslBindInProgress
52-
raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges)
52+
raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MAX_SASL_CHALLENGES)
5353

5454
cred = chall.call(pdu.result_server_sasl_creds)
5555
end

0 commit comments

Comments
 (0)