Fix leaking error when comparison leads to TypeError

This commit is contained in:
Maarten van Grootel
2017-01-16 12:26:19 -05:00
parent ffb0ace303
commit d7e7285fcb
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ module Liquid
elsif left.respond_to?(operation) && right.respond_to?(operation)
begin
left.send(operation, right)
rescue ::ArgumentError => e
rescue ::ArgumentError, TypeError => e
raise Liquid::ArgumentError.new(e.message)
end
end