Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respond_to? predicate needs to be renamed #73

Closed
dgutov opened this issue Jul 30, 2020 · 1 comment · Fixed by #99
Closed

respond_to? predicate needs to be renamed #73

dgutov opened this issue Jul 30, 2020 · 1 comment · Fixed by #99
Labels
Milestone

Comments

@dgutov
Copy link

dgutov commented Jul 30, 2020

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?.

@dgutov dgutov added the bug label Jul 30, 2020
@solnic solnic added this to the 2.0.0 milestone Jul 31, 2020
@etiennebarrie
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants