mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 01:10:41 -07:00
Use correct method
This commit is contained in:
@@ -270,7 +270,7 @@ module Liquid
|
||||
|
||||
# Replace the last occurrences of a string with another
|
||||
def replace_last(input, string, replacement = '')
|
||||
input.to_s.reserve.sub(string.to_s.reserve, replacement.to_s.reserve).reserve
|
||||
input.to_s.reverse.sub(string.to_s.reverse, replacement.to_s.reverse).reverse
|
||||
end
|
||||
|
||||
# remove a substring
|
||||
|
||||
Reference in New Issue
Block a user