diff --git a/lib/rubocop/cop/util.rb b/lib/rubocop/cop/util.rb index 6b1b6ffb9bc..d6f1cc62ea4 100644 --- a/lib/rubocop/cop/util.rb +++ b/lib/rubocop/cop/util.rb @@ -14,10 +14,12 @@ module Util module_function + # This is a bad API def comment_line?(line_source) /^\s*#/.match?(line_source) end + # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment` or similar def comment_lines?(node) processed_source[line_range(node)].any? { |line| comment_line?(line) } end