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

Fix an incorrect autocorrect for Minitest/RefuteMatch #185

Commits on Sep 27, 2022

  1. Fix an incorrect autocorrect for Minitest/RefuteMatch

    Follow up rubocop#181 and rubocop#184.
    
    This PR fixes an incorrect autocorrect for `Minitest/AssertMatch`
    when `refute` with `match` and RHS is a regexp literal.
    
    A regular expression literal must be the first argument to `refute_match`.
    `TypeError: no implicit conversion of Regexp into String` will occur if it is
    passed as the second argument.
    
    ```ruby
    refute_match(object, /regexp/) #=> TypeError: no implicit conversion of Regexp into String
    ```
    koic committed Sep 27, 2022
    Copy the full SHA
    40cbe03 View commit details
    Browse the repository at this point in the history