Fix internal liquid error when comparing hash with incompatible type (#849)

This commit is contained in:
Dylan Thacker-Smith
2017-01-16 13:13:17 -05:00
committed by GitHub
parent ffb0ace303
commit 2bb3552033
2 changed files with 8 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ module Liquid
if operation.respond_to?(:call)
operation.call(self, left, right)
elsif left.respond_to?(operation) && right.respond_to?(operation)
elsif left.respond_to?(operation) && right.respond_to?(operation) && !left.is_a?(Hash) && !right.is_a?(Hash)
begin
left.send(operation, right)
rescue ::ArgumentError => e