From 5bcde6eb483deae5a7fe77d652593024fdd7e849 Mon Sep 17 00:00:00 2001 From: Tom Maher Date: Thu, 25 Aug 2016 19:51:16 -0700 Subject: [PATCH] MaxSaslChallenges => MAX_SASL_CHALLENGES, because it's a constant and Rubocop --- lib/net/ldap/auth_adapter/sasl.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net/ldap/auth_adapter/sasl.rb b/lib/net/ldap/auth_adapter/sasl.rb index 0bfc701d..139e8593 100644 --- a/lib/net/ldap/auth_adapter/sasl.rb +++ b/lib/net/ldap/auth_adapter/sasl.rb @@ -4,7 +4,7 @@ module Net class LDAP class AuthAdapter class Sasl < Net::LDAP::AuthAdapter - MaxSaslChallenges = 10 + MAX_SASL_CHALLENGES = 10 #-- # Required parameters: :mechanism, :initial_credential and @@ -49,7 +49,7 @@ def bind(auth) end return pdu unless pdu.result_code == Net::LDAP::ResultCodeSaslBindInProgress - raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MaxSaslChallenges) + raise Net::LDAP::SASLChallengeOverflowError, "sasl-challenge overflow" if ((n += 1) > MAX_SASL_CHALLENGES) cred = chall.call(pdu.result_server_sasl_creds) end