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/AssertMatch #181

Commits on Sep 6, 2022

  1. Fix an incorrect autocorrect for Minitest/AssertMatch

    This PR fixes an incorrect autocorrect for `Minitest/AssertMatch`
    when `assert` with `match` and RHS is a regexp literal.
    
    A regular expression literal must be the first argument to `assert_match`.
    `TypeError: no implicit conversion of Regexp into String` will occur if it is
    passed as the second argument.
    
    ```ruby
    assert_match(object, /regexp/) #=> TypeError: no implicit conversion of Regexp into String
    ```
    
    This issue was found on faker-ruby/faker#2556.
    koic committed Sep 6, 2022
    Copy the full SHA
    9460a61 View commit details
    Browse the repository at this point in the history