lib/rubocop/cop/style/if_unless_modifier.rb in rubocop-0.75.1 vs lib/rubocop/cop/style/if_unless_modifier.rb in rubocop-0.76.0

- old
+ new

@@ -68,11 +68,18 @@ def too_long_single_line?(node) return false unless max_line_length range = node.source_range - range.first_line == range.last_line && - range.last_column > max_line_length + return false unless range.first_line == range.last_line + return false unless line_length_enabled_at_line?(range.first_line) + + range.last_column > max_line_length + end + + def line_length_enabled_at_line?(line) + processed_source.comment_config + .cop_enabled_at_line?('Metrics/LineLength', line) end def named_capture_in_condition?(node) node.condition.match_with_lvasgn_type? end