Skip to content
Unverified Commit 8864662d authored by Dany Marcoux's avatar Dany Marcoux
Browse files

Fix haml-lint MultilineScript offense

A false positive is triggered by the linter MultilineScript, so this
explains the switch from =~ to match?.

On top of this, since Ruby 2.4, `String#match?`, `Regexp#match?` and
`Symbol#match?` have been added.  The methods are faster than
`match`/`=~`.  Because the methods avoid creating a `MatchData` object
or saving backref. So, when `MatchData` is not used, use `match?`
instead of `match`/`=~`.
parent 646b53d5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment