mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user