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] Parenthesis-less Calls with &. Parser Rule Missing #4533

Open
DavidBakerEffendi opened this issue May 6, 2024 · 0 comments
Open

[ruby] Parenthesis-less Calls with &. Parser Rule Missing #4533

DavidBakerEffendi opened this issue May 6, 2024 · 0 comments
Labels
ruby Relates to rubysrc2cpg

Comments

@DavidBakerEffendi
Copy link
Collaborator

Below shows an example of the code

class Foo
  def bar(arg)
    return arg
  end
end

foo = Foo.new
foo&.bar x # <-- no call, only `foo` identifier detected

What is interesting is that foo&.bar(x) works. So the parser rule for simply expecting the argument list does not include the way the call member is accessed.

Might be worth determining if this is valid syntax before solving.

@DavidBakerEffendi DavidBakerEffendi added the ruby Relates to rubysrc2cpg label May 6, 2024
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

No branches or pull requests

1 participant