Pattern: Missing use of String#end_with?
Issue: -
This rule identifies unnecessary use of a regex where String#end_with?
would suffice.
# bad
'abc' =~ /bc\Z/
'abc'.match(/bc\Z/)
# good
'abc'.end_with?('bc')
Pattern: Missing use of String#end_with?
Issue: -
This rule identifies unnecessary use of a regex where String#end_with?
would suffice.
# bad
'abc' =~ /bc\Z/
'abc'.match(/bc\Z/)
# good
'abc'.end_with?('bc')