mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -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
|
# Replace the last occurrences of a string with another
|
||||||
def replace_last(input, string, replacement = '')
|
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
|
end
|
||||||
|
|
||||||
# remove a substring
|
# remove a substring
|
||||||
|
|||||||
Reference in New Issue
Block a user