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

Make sure lone identifier optimization respects return #2873

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

fabsx00
Copy link
Contributor

@fabsx00 fabsx00 commented Jun 13, 2023

We previously removed lone identifiers even if they actually also appeared in return statements. That was incorrect but not triggered when the affected identifier was a local or parameter. The bug became apparent because in the ruby frontend, locals are currently missing. While we should add locals to the ruby CPG, this fix should be made nonetheless and it fixes a missing flow we were observing.

@DavidBakerEffendi DavidBakerEffendi merged commit e3ee985 into master Jun 14, 2023
@DavidBakerEffendi DavidBakerEffendi added bug Something isn't working ruby Relates to rubysrc2cpg labels Jun 14, 2023
@max-leuthaeuser max-leuthaeuser deleted the fabs/rubylocalfix branch July 18, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ruby Relates to rubysrc2cpg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants