Closed dgutov closed 2 years ago
The same issue exists with eql?
.
h = {}
o = Object.new
def o.hash
Dry::Logic::Predicates.hash
end
h[o] = true
h[Dry::Logic::Predicates]
# ! => lib/dry/logic/predicates.rb:181:in `eql?': wrong number of arguments (given 1, expected 2) (ArgumentError)
As discussed in https://github.com/dry-rb/dry-logic/pull/55, its current name overrides
Object#respond_to?
in an incompatible fashion.We can rename it to
responds_to?
, for example. Just likeincludes?
delegates toinclude?
.