diff --git a/lib/rubocop/comment_config.rb b/lib/rubocop/comment_config.rb index 91f58591ed9..caf6a549ccc 100644 --- a/lib/rubocop/comment_config.rb +++ b/lib/rubocop/comment_config.rb @@ -107,7 +107,7 @@ def analyze_rest(analysis, line) def cop_line_ranges(analysis) return analysis.line_ranges unless analysis.start_line_number - analysis.line_ranges + [(analysis.start_line_number.to_f..Float::INFINITY)] + analysis.line_ranges + [(analysis.start_line_number..Float::INFINITY)] end def each_mentioned_cop