The following works just fine:
{
(send (send nil? $:be) :== $_)
(send nil? $:be $...)
(send nil? $_ $_ ...)
}
but after naming captured wildcards ($_ => $_argument), it stops working:
{
(send (send nil? $:be) :== $_argument)
(send nil? $:be $...)
(send nil? $_ $_argument ...)
}
More context: https://github.com/rubocop-hq/rubocop-rspec/pull/858/files#diff-b3d90344c521a6844303917bf666af07R45
Named wildcards don't affect matching.
Naming wildcards breaks matching.
Source for reproduction:
eq(1)
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
$ [bundle exec] rubocop -V
0.79.0 (using Parser 2.7.0.2, running on ruby 2.5.5 x86_64-darwin18)
Interesting.
There are a few scenarios that are interesting. I'll see what I can do.
Most helpful comment
Interesting.
There are a few scenarios that are interesting. I'll see what I can do.