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-06-04 13:09:42 -07:00
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -102,12 +102,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