`respond_to?` predicate needs to be renamed
dgutov opened this issue · comments
As discussed in #55, its current name overrides Object#respond_to?
in an incompatible fashion.
We can rename it to responds_to?
, for example. Just like includes?
delegates to include?
.
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)