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
rubocop -a turns one-line method definitions into syntactically incorrect end-less method definitions on Ruby 3.0.
rubocop -a
Example:
def sndhwm() Zsock.sndhwm(@zocket) end
Correct syntax:
def sndhwm = Zsock.sndhwm(@zocket)
def sndhwm(()) = Zsock.sndhwm(@zocket)
1.8.0 (using Parser 3.0.0.0, rubocop-ast 1.4.0, running on ruby 3.0.0 x86_64-linux)
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
The text was updated successfully, but these errors were encountered:
I'll take a look at this.
Sorry, something went wrong.
[Fix rubocop#9355] Fix Style/SingleLineMethods autocorrection to en…
Style/SingleLineMethods
f588088
…dless method when the original code had parens.
Merge pull request #9361 from dvandersluis/issue/9355
94ced7b
[Fix #9355] Fix `Style/SingleLineMethods` autocorrection to endless method when the original code had parens
Successfully merging a pull request may close this issue.
rubocop -a
turns one-line method definitions into syntactically incorrect end-less method definitions on Ruby 3.0.Example:
Expected behavior
Correct syntax:
Actual behavior
RuboCop version
1.8.0 (using Parser 3.0.0.0, rubocop-ast 1.4.0, running on ruby 3.0.0 x86_64-linux)
Ruby version
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
The text was updated successfully, but these errors were encountered: