Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error for
Layout/HeredocArgumentClosingParenthesis
This PR fixes an error for `Layout/HeredocArgumentClosingParenthesis` when heredoc is a method argument in a parenthesized block argument: ```ruby foo(bar do baz <<~EOS EOS end) ``` ```console % bundle exec rubocop --only Layout/HeredocArgumentClosingParenthesis (snip) undefined method `begin_pos' for nil:NilClass /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/layout/ heredoc_argument_closing_parenthesis.rb:220:in `exist_argument_between_heredoc_end_and_closing_parentheses?' /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/layout/ heredoc_argument_closing_parenthesis.rb:73:in `on_send' /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/commissioner.rb:107:in `public_send' ```
- Loading branch information