Skip to content

Commit

Permalink
[Fix #6937] Make Style/BlockDelimiters aware of safe navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Krizhanovski authored and bbatsov committed May 1, 2019
1 parent 9723b47 commit 0e6eb31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rubocop/ast/node.rb
Expand Up @@ -459,8 +459,12 @@ def parenthesized_call?
loc.respond_to?(:begin) && loc.begin && loc.begin.is?('(')
end

def call_type?
send_type? || csend_type?
end

def chained?
parent && parent.send_type? && eql?(parent.receiver)
parent && parent.call_type? && eql?(parent.receiver)
end

def argument?
Expand Down

0 comments on commit 0e6eb31

Please sign in to comment.