Skip to content

Commit

Permalink
Document that we allow parens where omitting them is ambiguous or inv…
Browse files Browse the repository at this point in the history
…alid
  • Loading branch information
gsamokovarov authored and bbatsov committed Apr 4, 2021
1 parent 93ecd7e commit 7f45422
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/rubocop/cop/style/method_call_with_args_parentheses.rb
Expand Up @@ -40,8 +40,12 @@ module Style
# to `true` allows the presence of parentheses in such a method call
# even with arguments.
#
# NOTE: Parens are required around a method with arguments when inside an
# endless method definition (>= Ruby 3.0).
# NOTE: Parentheses are still allowed in cases where omitting them
# results in ambiguous or syntactically incorrect code. For example,
# parentheses are required around a method with arguments when inside an
# endless method definition introduced in Ruby 3.0. Parentheses are also
# allowed when forwarding arguments with the triple-dot syntax introduced
# in Ruby 2.7 as omitting them starts an endless range.
#
# @example EnforcedStyle: require_parentheses (default)
#
Expand Down

0 comments on commit 7f45422

Please sign in to comment.