Use to_liquid_value in uniq filter (#1948)

* Use to_liquid_value in uniq filter

* Bump version to 5.8.4
This commit is contained in:
Ian Ker-Seymer
2025-04-09 15:00:01 -04:00
committed by GitHub
parent 2b75bfaff4
commit dbe709c3bf
4 changed files with 50 additions and 2 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'