Pattern: Missing use of String#start_with?
Issue: -
This rule identifies unnecessary use of a Regex where String#start_with?
would suffice.
# bad
'abc' =~ /\Aab/
'abc'.match(/\Aab/)
# good
'abc'.start_with?('ab')
Pattern: Missing use of String#start_with?
Issue: -
This rule identifies unnecessary use of a Regex where String#start_with?
would suffice.
# bad
'abc' =~ /\Aab/
'abc'.match(/\Aab/)
# good
'abc'.start_with?('ab')