mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
Remove == method from drops from testing to_liquid_value
Since they could cause tests to pass without to_liquid_value being called on the left side of the equality comparison.
This commit is contained in:
@@ -131,10 +131,6 @@ class IntegerDrop < Liquid::Drop
|
|||||||
@value = value.to_i
|
@value = value.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def ==(other)
|
|
||||||
@value == other
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
@value.to_s
|
@value.to_s
|
||||||
end
|
end
|
||||||
@@ -150,10 +146,6 @@ class BooleanDrop < Liquid::Drop
|
|||||||
@value = value
|
@value = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def ==(other)
|
|
||||||
@value == other
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_liquid_value
|
def to_liquid_value
|
||||||
@value
|
@value
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user