Skip to content
New issue

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

Lint/RedundantDirGlobSort crashes #9342

Closed
jonas054 opened this issue Jan 7, 2021 · 0 comments · Fixed by #9344
Closed

Lint/RedundantDirGlobSort crashes #9342

jonas054 opened this issue Jan 7, 2021 · 0 comments · Fixed by #9344
Labels

Comments

@jonas054
Copy link
Collaborator

jonas054 commented Jan 7, 2021

With

# .rubocop.yml
AllCops:
  NewCops: enable
  TargetRubyVersion: '3.0'

and

# file.rb
a.sort

running

$ rubocop --only Lint/RedundantDirGlobSort

Expected behavior

No error.

Actual behavior

Inspecting 1 file
An error occurred while Lint/RedundantDirGlobSort cop was inspecting /tmp/sort/file.rb:2:0.
To see the complete backtrace run rubocop -d.
.

1 file inspected, no offenses detected

1 error occurred:
An error occurred while Lint/RedundantDirGlobSort cop was inspecting /tmp/sort/file.rb:2:0.

Steps to reproduce the problem

As above.

RuboCop version

1.8.0 (using Parser 3.0.0.0, rubocop-ast 1.3.0, running on ruby 3.0.0 x86_64-linux)
@jonas054 jonas054 added the bug label Jan 7, 2021
koic added a commit to koic/rubocop that referenced this issue Jan 7, 2021
Fixes rubocop#9342.

This PR fixes an error for `Lint/RedundantDirGlobSort`
when using `collection.sort`.
bbatsov pushed a commit that referenced this issue Jan 7, 2021
Fixes #9342.

This PR fixes an error for `Lint/RedundantDirGlobSort`
when using `collection.sort`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant