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

[ruby] Make <body> Call Static Dispatch #4726

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

DavidBakerEffendi
Copy link
Collaborator

As the <body> call is synthetic and meant to be immediately deterministic, so there is no reason it should be re-determined.

As the `<body>` call is synthetic and meant to be immediately deterministic, so there is no reason it should be re-determined.
@DavidBakerEffendi DavidBakerEffendi requested a review from ml86 July 3, 2024 12:22
@DavidBakerEffendi DavidBakerEffendi added the ruby Relates to rubysrc2cpg label Jul 3, 2024
@DavidBakerEffendi DavidBakerEffendi self-assigned this Jul 3, 2024
Copy link
Contributor

@ml86 ml86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected some change indicating that there is no receiver specified anymore for the call to the body method. Am I missing this?

@DavidBakerEffendi
Copy link
Collaborator Author

I would have expected some change indicating that there is no receiver specified anymore for the call to the body method. Am I missing this?

So since it's static, we would get rid of the receiver, is that what you mean? For reference, this is the call:

graphviz

@ml86
Copy link
Contributor

ml86 commented Jul 3, 2024

Static calls do not have a receiver edge. They just have arguments and the call is dispatches via methodFullName property only.

@DavidBakerEffendi DavidBakerEffendi merged commit 18f7fae into master Jul 3, 2024
5 checks passed
@DavidBakerEffendi DavidBakerEffendi deleted the dave/ruby/body-call-static branch July 3, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Relates to rubysrc2cpg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants