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

Lint/SafeNavigationChain should allow in? (ActiveSupport) method #8500

Closed
johnnyshields opened this issue Aug 9, 2020 · 1 comment · Fixed by #8662
Closed

Lint/SafeNavigationChain should allow in? (ActiveSupport) method #8500

johnnyshields opened this issue Aug 9, 2020 · 1 comment · Fixed by #8662

Comments

@johnnyshields
Copy link

If ActiveSupport is required, the .in? method should be permitted in a safe-navigation chain:

foo&.to_sym.in?([:baz, :qux])

Currently this raises the error: Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.

RuboCop version: 0.89.0

@johnnyshields
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants