backport argument error fix

This commit is contained in:
Florian Weingarten
2015-07-24 11:04:40 -04:00
parent 5068fcae03
commit 529cc60ef1
2 changed files with 6 additions and 1 deletions

View File

@@ -316,7 +316,7 @@ module Liquid
else
nil
end
rescue ArgumentError
rescue ::ArgumentError
nil
end

View File

@@ -379,6 +379,11 @@ class StandardFiltersTest < Minitest::Test
assert_template_result('a',"{{ 'a' | to_number }}")
end
def test_date_raises_nothing
assert_template_result('', "{{ '' | date: '%D' }}")
assert_template_result('abc', "{{ 'abc' | date: '%D' }}")
end
private
def with_timezone(tz)