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
I caught this while upgrading Rubocop in one of our company's internal codebases. This all refers to the Rails/IndexBy cop.
Rails/IndexBy
Given a snippet of code like so:
x.map { |y| [y.to_sym, y] }. to_h
The correction yields invalid Ruby code:
x.index_by { |y| y.to_sym }. # notice the ending '.'
Not having the final dot...
The additional dot makes the correction emit invalid Ruby. 😅
PR incoming with a couple of tests...
[21:05:25] ~/workspace/marleyspoon/rubocop-rails ● $ bundle exec rubocop -V 0.82.0 (using Parser 2.7.1.1, running on ruby 2.6.2 x86_64-darwin19)
The text was updated successfully, but these errors were encountered:
8307c6a
No branches or pull requests
I caught this while upgrading Rubocop in one of our company's internal codebases. This all refers to the
Rails/IndexBy
cop.Given a snippet of code like so:
The correction yields invalid Ruby code:
Expected behavior
Not having the final dot...
Actual behavior
The additional dot makes the correction emit invalid Ruby. 😅
Steps to reproduce the problem
PR incoming with a couple of tests...
RuboCop version
The text was updated successfully, but these errors were encountered: