Skip to content

Commit

Permalink
PairNode#delimiter and inverse_delimiter now accept their argumen…
Browse files Browse the repository at this point in the history
…t as a named argument.
  • Loading branch information
marcandre committed Aug 1, 2020
1 parent bf972d3 commit 2ce8c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@
* [#70](https://github.com/rubocop-hq/rubocop-ast/pull/70): Fix arguments processing for `BreakNode` ([@marcandre][])
* [#70](https://github.com/rubocop-hq/rubocop-ast/pull/70): **(Potentially breaking)** `BreakNode` and `ReturnNode` no longer include `MethodDispatchNode`. These methods were severely broken ([@marcandre][])

### Changes

* [#x](https://github.com/rubocop-hq/rubocop-ast/pull/x): `PairNode#delimiter` and `inverse_delimiter` now accept their argument as a named argument. ([@marcandre][])

## 0.2.0 (2020-07-19)

### New features
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/ast/node/pair_node.rb
Expand Up @@ -32,7 +32,7 @@ def colon?
#
# @param [Boolean] with_spacing whether to include spacing
# @return [String] the delimiter of the `pair`
def delimiter(with_spacing = false)
def delimiter(*deprecated, with_spacing: deprecated.first)
if with_spacing
hash_rocket? ? SPACED_HASH_ROCKET : SPACED_COLON
else
Expand All @@ -44,7 +44,7 @@ def delimiter(with_spacing = false)
#
# @param [Boolean] with_spacing whether to include spacing
# @return [String] the inverse delimiter of the `pair`
def inverse_delimiter(with_spacing = false)
def inverse_delimiter(*deprecated, with_spacing: deprecated.first)
if with_spacing
hash_rocket? ? SPACED_COLON : SPACED_HASH_ROCKET
else
Expand Down

0 comments on commit 2ce8c2f

Please sign in to comment.