diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 315dc0c5..7699e8a6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -221,7 +221,7 @@ Metrics/BlockNesting: # Offense count: 11 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 429 + Max: 445 # Offense count: 23 Metrics/CyclomaticComplexity: diff --git a/lib/net/ldap.rb b/lib/net/ldap.rb index bb84a5ab..c86602ce 100644 --- a/lib/net/ldap.rb +++ b/lib/net/ldap.rb @@ -1351,14 +1351,14 @@ def normalize_encryption(args) # Recursively delete a dn and it's subordinate children. # This is useful when a server does not support the DELETE_TREE control code. def recursive_delete(args) - raise EmptyDNError unless args.is_a?(Hash) && args.has_key?(:dn) + raise EmptyDNError unless args.is_a?(Hash) && args.key?(:dn) # Delete Children search(base: args[:dn], scope: Net::LDAP::SearchScope_SingleLevel) do |entry| recursive_delete(dn: entry.dn) end # Delete Self unless delete(dn: args[:dn]) - raise Net::LDAP::Error, self.get_operation_result[:error_message].to_s + raise Net::LDAP::Error, get_operation_result[:error_message].to_s end true end