diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f89b1fe1e..3ccd6897bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Bug fixes + +* [#67](https://github.com/rubocop-hq/rubocop-performance/issues/67): Fix an error for `Performance/RedundantMerge` when `MaxKeyValuePairs` option is set to `null`. ([@koic][]) + ## 1.4.0 (2019-06-20) ### Bug fixes diff --git a/lib/rubocop/cop/performance/redundant_merge.rb b/lib/rubocop/cop/performance/redundant_merge.rb index 2e43734520..45b610846c 100644 --- a/lib/rubocop/cop/performance/redundant_merge.rb +++ b/lib/rubocop/cop/performance/redundant_merge.rb @@ -132,7 +132,7 @@ def indent_width end def max_key_value_pairs - Integer(cop_config['MaxKeyValuePairs']) + Integer(cop_config['MaxKeyValuePairs']) || 2 end # A utility class for checking the use of values within an