Use to_liquid_value in uniq filter

This commit is contained in:
Ian Ker-Seymer
2025-04-09 14:54:25 -04:00
parent 2b75bfaff4
commit e3be6ed542
3 changed files with 49 additions and 1 deletions
+29
View File
@@ -146,6 +146,35 @@ class BooleanDrop < Liquid::Drop
end
end
class StringDrop < Liquid::Drop
include Comparable
def initialize(value)
super()
@value = value
end
def to_liquid_value
@value
end
def to_s
@value
end
def to_str
@value
end
def inspect
"#<StringDrop @value=#{@value.inspect}>"
end
def <=>(other)
to_liquid_value <=> Liquid::Utils.to_liquid_value(other)
end
end
class ErrorDrop < Liquid::Drop
def standard_error
raise Liquid::StandardError, 'standard error'