Fix Performance/RedundantEqualityComparisonBlock cop (#24799)

lolsob-rspec
Matt Jankowski 2023-05-03 04:30:10 -04:00 committed by GitHub
parent d76495d080
commit fdd7fc23c2
2 changed files with 1 additions and 7 deletions

View File

@ -327,12 +327,6 @@ Performance/MethodObjectAsBlock:
- 'app/models/account_suggestions/source.rb' - 'app/models/account_suggestions/source.rb'
- 'spec/models/export_spec.rb' - 'spec/models/export_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowRegexpMatch.
Performance/RedundantEqualityComparisonBlock:
Exclude:
- 'spec/requests/link_headers_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all). # This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: MaxKeyValuePairs. # Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge: Performance/RedundantMerge:

View File

@ -26,7 +26,7 @@ describe 'Link headers' do
def link_header_with_type(type) def link_header_with_type(type)
LinkHeader.parse(response.headers['Link'].to_s).links.find do |link| LinkHeader.parse(response.headers['Link'].to_s).links.find do |link|
link.attr_pairs.any? { |pair| pair == ['type', type] } link.attr_pairs.any?(['type', type])
end end
end end
end end