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

SuperDiff::ObjectInspection.inspect violates Liskov Substitution Principle #119

Closed
dgutov opened this issue Jan 19, 2021 · 3 comments
Closed

Comments

@dgutov
Copy link

dgutov commented Jan 19, 2021

Breaking certain kinds of introspection:

> SuperDiff::ObjectInspection.method(:inspect).owner.to_s
ArgumentError: wrong number of arguments (given 0, expected 1; required keyword: as_single_line)
from /home/dgutov/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/super_diff-0.4.2/lib/super_diff/object_inspection.rb:13:in `inspect'
@dgutov
Copy link
Author

dgutov commented Jan 19, 2021

Could you rename that method to call, perform or etc?

@mcmire
Copy link
Collaborator

mcmire commented Jan 19, 2021

Ah... yeah, that would break stuff, wouldn't it. I forgot that classes can be inspected too. Thanks for letting me know about this, I'll add a fix for this soon.

@mcmire
Copy link
Collaborator

mcmire commented May 19, 2021

Closing since this should be fixed now!

@mcmire mcmire closed this as completed May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants