-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix #1935] Allow Symbol#to_proc blocks in Performance/Size #1936
Conversation
The heading of the commit message should start |
Oops, fixed the commit message. |
e5c608f
to
3bc06da
Compare
Added to CHANGELOG as well. |
The build is failing because of a couple of long lines. |
I've fixed the spec descriptions that were > 80 chars. I can't figure out why coveralls is failing though; the file I changed is still at 100% coverage. |
it 'does not register an offense when calling count with a to_proc block' do | ||
inspect_source(cop, '[1, 2, 3].count(&:nil?)') | ||
|
||
expect(cop.messages).to be_empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest checking cop.offenses
instead as it's more natural.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. The rest of the spec still uses cop.messages
though.
You can ignore this. Just address my tiny remark and rebase on top of the current |
This check should pass when passing a block to #count, but Symbol#to_proc blocks were not being allowed like they should.
Rebased on master. Should be good to merge. |
This check should pass when passing a block to
count
, butSymbol#to_proc
blocks were not being allowed like they should.Fixes #1935