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 88c76af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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

* [#86](https://github.com/rubocop-hq/rubocop-ast/pull/86): `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
Original file line number Diff line number Diff line change
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 88c76af

Please sign in to comment.