lib/rubocop/cop/mixin/configurable_max.rb in rubocop-0.34.2 vs lib/rubocop/cop/mixin/configurable_max.rb in rubocop-0.35.0
- old
+ new
@@ -4,10 +4,10 @@
module Cop
# Handles `Max` configuration parameters, especially setting them to an
# appropriate value with --auto-gen-config.
module ConfigurableMax
def max=(value)
- cfg = self.config_to_allow_offenses ||= {}
+ cfg = config_to_allow_offenses
value = [cfg[parameter_name], value].max if cfg[parameter_name]
cfg[parameter_name] = value
end
def parameter_name