We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using a variable inside a block I would not expect a Lint/UselessAssignment offense.
When I use a variable inside a block I get a Lint/UselessAssignment offense.
array1 = [1, 2, 3, 4, 5, 6] array2 = [6, 7, 8] array1.select { array2.include?(_1) }
After running rubocop I get the next output:
Offenses: test.rb:2:1: W: Lint/UselessAssignment: Useless assignment to variable - array2. Did you mean array1? array2 = [6, 7, 8]
1.44.0
The text was updated successfully, but these errors were encountered:
This issue is a dup with #11485 and resolved by #11488.
Sorry, something went wrong.
No branches or pull requests
Expected behavior
When using a variable inside a block I would not expect a Lint/UselessAssignment offense.
Actual behavior
When I use a variable inside a block I get a Lint/UselessAssignment offense.
Steps to reproduce the problem
After running rubocop I get the next output:
RuboCop version
1.44.0
The text was updated successfully, but these errors were encountered: