Skip to content

Commit

Permalink
Suppress keyword argument warnings in Ruby 2.7 (#612)
Browse files Browse the repository at this point in the history
Follow up of #608 (comment).

RuboCop's CI of Ruby 2.7 matrix is failing. This is due to
a deprecation warning in Ruby 2.7.

```console
/usr/local/bundle/gems/parser-2.6.4.1/lib/parser/source/tree_rewriter.rb:269:
warning: The last argument is used as the keyword parameter
/usr/local/bundle/gems/parser-2.6.4.1/lib/parser/source/tree_rewriter/action.rb:16:
warning: for `initialize' defined here
```

https://circleci.com/gh/rubocop-hq/rubocop/68131

cf. https://bugs.ruby-lang.org/issues/14183
  • Loading branch information
koic authored and iliabylich committed Sep 27, 2019
1 parent f8b99f5 commit 1523bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser/source/tree_rewriter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def check_policy_validity

def combine(range, attributes)
range = check_range_validity(range)
action = TreeRewriter::Action.new(range, @enforcer, attributes)
action = TreeRewriter::Action.new(range, @enforcer, **attributes)
@action_root = @action_root.combine(action)
self
end
Expand Down

0 comments on commit 1523bcc

Please sign in to comment.