diff --git a/lib/rubocop/cop/rails/squished_sql_heredocs.rb b/lib/rubocop/cop/rails/squished_sql_heredocs.rb index 887cb0492d..24fe9cab43 100644 --- a/lib/rubocop/cop/rails/squished_sql_heredocs.rb +++ b/lib/rubocop/cop/rails/squished_sql_heredocs.rb @@ -68,7 +68,7 @@ def sql_heredoc?(node) end def using_squish?(node) - node.parent&.send_type? && node.parent&.method?(:squish) + node.parent&.send_type? && node.parent.method?(:squish) end def singleline_comments_present?(node) diff --git a/lib/rubocop/cop/rails/where_range.rb b/lib/rubocop/cop/rails/where_range.rb index 1c8fd4a0fb..a42a2302a6 100644 --- a/lib/rubocop/cop/rails/where_range.rb +++ b/lib/rubocop/cop/rails/where_range.rb @@ -89,7 +89,7 @@ def on_send(node) def where_not?(node) receiver = node.receiver - receiver&.send_type? && receiver&.method?(:where) + receiver&.send_type? && receiver.method?(:where) end # rubocop:disable Metrics