You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does not expect Rubocop to flag the code above and even if it did, I expect the message to tell me to parenthesize the param to associate the block with find call.
Actual behavior
W: Lint/AmbiguousBlockAssociation: Parenthesize the param find to make sure that the block will
be associated with the assert_equal method call.
assert_equal site.posts.find { |p| p.title == "Foo Bar" }, results.first
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Lint/AmbiguousBlockAssociation
cop raises a false alarm against non-dubious block association.Example Code
Expected behavior
Does not expect Rubocop to flag the code above and even if it did, I expect the message to tell me to parenthesize the param to associate the block with
find
call.Actual behavior
Steps to reproduce the problem
Run
rubocop
against following:RuboCop version
Include the output of
rubocop -V
. Here's an example:(Also tested with latest
master
branch)(similar issue: Comment by @stephengroat)
/cc @smakagon
The text was updated successfully, but these errors were encountered: