Skip to content

Commit

Permalink
Address RuboCop feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Mar 28, 2022
1 parent 07bdc8d commit aaf998f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions language/keyword_arguments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def m(*args, **kwargs)
end

it "works with -> (*args, **kwargs) {}" do
m = -> (*args, **kwargs) do
m = -> *args, **kwargs do

This comment has been minimized.

Copy link
@aibaars

aibaars Apr 13, 2022

Contributor

@eregon I think this changes the meaning of the test case. The name it "works with -> (*args, **kwargs) {}" suggests that the purpose of the test is to validate that things work properly if the parentheses are include.

This comment has been minimized.

Copy link
@eregon

eregon Apr 13, 2022

Author Member

It doesn't, I wrote this entire file.
I could update the description, but the similarity with bar(*args, **kwargs) seems nice too.

This comment has been minimized.

Copy link
@aibaars

aibaars Apr 14, 2022

Contributor

Ok, sorry for the false alarm.

target(*args, **kwargs)
end

Expand Down Expand Up @@ -261,8 +261,8 @@ def y(args)
yield(*args)
end

ruby2_keywords def m(*args)
y(args, &-> (*args, **kwargs) { target(*args, **kwargs) })
ruby2_keywords def m(*outer_args)
y(outer_args, &-> *args, **kwargs { target(*args, **kwargs) })
end
end

Expand Down

0 comments on commit aaf998f

Please sign in to comment.