mirror of
https://github.com/kemko/liquid.git
synced 2026-01-05 17:55:40 +03:00
backport argument error fix
This commit is contained in:
@@ -316,7 +316,7 @@ module Liquid
|
||||
else
|
||||
nil
|
||||
end
|
||||
rescue ArgumentError
|
||||
rescue ::ArgumentError
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user