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
The following code will cause the WhileUntil cop to complain.
lines = %w{first second third} while (line = lines.shift) puts line end
However, the alternative is not legal Ruby. The following code
lines = ["first", "second", "third"] puts line while (line = lines.shift)
would give the error message
-:2:in `<main>': undefined local variable or method `line' for main:Object (NameError)
The text was updated successfully, but these errors were encountered:
e2ac201
Merge pull request #680 from emou/issue664-whileuntil
43ea8af
[Fix #664] Accept oneline while when condition has local variable assignment
No branches or pull requests
The following code will cause the WhileUntil cop to complain.
However, the alternative is not legal Ruby. The following code
would give the error message
The text was updated successfully, but these errors were encountered: