start_index will never be -1

This commit is contained in:
Anders Søgaard
2021-09-13 18:00:03 +02:00
parent b5abd145e3
commit 986391cb7d
+1 -1
View File
@@ -300,7 +300,7 @@ module Liquid
def replace_last(input, string, replacement)
start_index = input.to_s.rindex(string.to_s)
if !start_index.nil? && start_index > -1
if !start_index.nil?
end_index = start_index + replacement.to_s.length
duplicate = input.to_s.dup