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

undefined method operator_method?'` in 0.32 #261

Closed
alaz opened this issue Sep 23, 2023 · 0 comments · Fixed by #262
Closed

undefined method operator_method?'` in 0.32 #261

alaz opened this issue Sep 23, 2023 · 0 comments · Fixed by #262
Labels
bug Something isn't working

Comments

@alaz
Copy link

alaz commented Sep 23, 2023

Version 0.32 errors out with the following trace:

An error occurred while Minitest/AssertOperator cop was inspecting /Users/alaz/projects/legitbot/test/you_test.rb:36:4.
undefined method `operator_method?' for s(:lvar, :bot):RuboCop::AST::Node
Did you mean?  operator_keyword?
/Users/alaz/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/rubocop-minitest-0.32.0/lib/rubocop/cop/minitest/assert_operator.rb:23:in `on_send'
/Users/alaz/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/rubocop-1.56.3/lib/rubocop/cop/commissioner.rb:143:in `public_send'
/Users/alaz/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/rubocop-1.56.3/lib/rubocop/cop/commissioner.rb:143:in `block (2 levels) in trigger_restricted_cops'

Expected behavior

Actual behavior

Steps to reproduce the problem

I noticed this from the failure run of a weekly Github action which runs rubocop on https://github.com/alaz/legitbot . The action's log is here.

How to repro:

bundle exec rubocop -d

RuboCop version

1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.0.6) [x86_64-darwin22]
  - rubocop-minitest 0.32.0
@alaz alaz changed the title Error in the cop in 0.32 undefined method operator_method?'` in 0.32 Sep 23, 2023
@koic koic added the bug Something isn't working label Sep 23, 2023
koic added a commit to koic/rubocop-minitest that referenced this issue Sep 23, 2023
Fixes rubocop#261.

This PR fixes an error for `Minitest/AssertOperator` and `Minitest/RefuteOperator`.
koic added a commit to koic/rubocop-minitest that referenced this issue Sep 23, 2023
Fixes rubocop#261.

This PR fixes an error for `Minitest/AssertOperator` and `Minitest/RefuteOperator`
when using variable argument.
@koic koic closed this as completed in #262 Sep 24, 2023
koic added a commit that referenced this issue Sep 24, 2023
[Fix #261] Fix an error for `Minitest/AssertOperator`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants