Make Condition unit tests go through BinaryExpression

Instead of having Condition parse the left op right, make
BinaryExpression do it. Make sure all the tests pass as they
used to in the process.
This commit is contained in:
Charles-P. Clermont
2026-01-26 16:52:31 -05:00
parent 83f0ac5424
commit daae2186d2
2 changed files with 11 additions and 6 deletions
+2
View File
@@ -30,6 +30,8 @@ module Liquid
!equal_variables(left, right)
when 'contains'
contains(left, right)
else
raise(Liquid::ArgumentError, "Unknown operator #{operator}")
end
rescue ::ArgumentError => e
raise Liquid::ArgumentError, e.message