Fix SelfDrop equality

This commit is contained in:
Guilherme Carreiro
2026-06-02 16:41:59 +02:00
parent 742ac3dbf5
commit b18930f2ea
2 changed files with 32 additions and 0 deletions
+14
View File
@@ -35,6 +35,20 @@ module Liquid
self
end
def ==(other)
other.is_a?(SelfDrop) && other.self_context.equal?(@self_context)
end
alias_method :eql?, :==
def hash
@self_context.object_id.hash
end
protected
attr_reader :self_context
undef context=
end
end