Use String#end_with? instead of comparison expression