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
for
Should parse as valid code.
Fails with:
An error occurred while VariableForce cop was inspecting example.rb
Create a file containing the following, and run RuboCop against it.
for i in x end
v1.52.0
This started failing in v1.51.0, it works on versions before that.
% rubocop -V 1.52.0 (using Parser 3.2.2.1, rubocop-ast 1.28.1, running on ruby 3.2.1) [arm64-darwin22] - rubocop-minitest 0.31.0 - rubocop-rake 0.6.0 - rubocop-sorbet 0.7.0
The text was updated successfully, but these errors were encountered:
[Fix rubocop#11919] Fix an error for Lint/UselessAssignment
Lint/UselessAssignment
394b019
Fixes rubocop#11919. This PR fixes an error for `Lint/UselessAssignment` when a variable is assigned and unreferenced in `for`.
[Fix #11919] Fix an error for Lint/UselessAssignment
728457d
Fixes #11919. This PR fixes an error for `Lint/UselessAssignment` when a variable is assigned and unreferenced in `for`.
Successfully merging a pull request may close this issue.
Expected behavior
Should parse as valid code.
Actual behavior
Fails with:
An error occurred while VariableForce cop was inspecting example.rb
Steps to reproduce the problem
Create a file containing the following, and run RuboCop against it.
RuboCop version
v1.52.0
This started failing in v1.51.0, it works on versions before that.
The text was updated successfully, but these errors were encountered: