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

[Fix #331] Fix crash in OpAsgnNode#name when the lhs is a send or csend node #332

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

dvandersluis
Copy link
Member

OpAsgnNode#assignment_node could be a send/csend node, but this would cause #name to crash as call nodes do not respond to name.

Fixes #331.

@dvandersluis
Copy link
Member Author

@bquorning note that name isn't necessarily the source of the LHS (so your workaround in rubocop/rubocop#13426 might still be necessary). Similarly to #203, name will return the variable name, not the entire receiver.

@marcandre marcandre merged commit 048eb8d into rubocop:master Nov 7, 2024
20 checks passed
@marcandre
Copy link
Contributor

Thanks to both of you ❤️

Released as 1.34.1

@dvandersluis dvandersluis deleted the issue/331 branch November 7, 2024 19:28
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

Successfully merging this pull request may close these issues.

OpAsgnNode doesn't work with explict receiver on the assignment node
3 participants