Merge pull request #173 from jsw0528/master

fix `can't convert Fixnum into String` for `replace`
This commit is contained in:
Dylan Thacker-Smith
2013-11-11 08:54:03 -05:00
committed by Florian Weingarten
parent 53b6db48e3
commit fc63219087
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -107,12 +107,12 @@ module Liquid
# Replace occurrences of a string with another
def replace(input, string, replacement = '')
input.to_s.gsub(string, replacement)
input.to_s.gsub(string, replacement.to_s)
end
# Replace the first occurrences of a string with another
def replace_first(input, string, replacement = '')
input.to_s.sub(string, replacement)
input.to_s.sub(string, replacement.to_s)
end
# remove a substring