String#end_with?
instead of a regex match anchored to the end of the string RB-PR1009Instead of searching for a string pattern at the end of a string using regex, it is more efficient to simply use end_with?
instead.
'abc'.match(/bc$/)
'abc'.end_with?('bc')