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
Style/PreferredHashMethods false posive on object that is not a Hash #6359
Comments
This cop should be marked unsafe, as it could not know whether the receiver is a hash |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
@Darhazer Sent a PR to mark it as unsafe. Apart from this, do you think we should handle the case of no receiver? Calling without receiver most probably means it is not a Hash (unless Hash class is opened). |
yeah, I guess it doesn't make sense to flag on nil receiver |
I'm seeing this error:
but the method is not on a hash, it's on a
DocumentPresenter
.The text was updated successfully, but these errors were encountered: