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 rules don't match parameter-less calls #3811

Closed
1 of 3 tasks
edamamez opened this issue Sep 3, 2021 · 1 comment · Fixed by #3951
Closed
1 of 3 tasks

Ruby rules don't match parameter-less calls #3811

edamamez opened this issue Sep 3, 2021 · 1 comment · Fixed by #3951
Assignees
Labels
bug Something isn't working core lang:ruby

Comments

@edamamez
Copy link

edamamez commented Sep 3, 2021

Describe the bug
When writing a Ruby rule, Semgrep returns a false negative on method calls with no parameters.
(link to Slack discussion: https://r2c-community.slack.com/archives/C018NJRRCJ0/p1630341006011600)

To Reproduce
https://semgrep.dev/s/brbQ

Expected behavior
A parameter-less call should be able to be matched.

Screenshots
Screenshot of semgrep rule in ruby where foo method with no parameters doesnt match

What is the priority of the bug to you?

  • P0: blocking your adoption of Semgrep or workflow
  • P1: important to fix or quite annoying
  • P2: regular bug that should get fixed
@r2c-demo
Copy link
Collaborator

r2c-demo commented Sep 3, 2021

@ievans ievans added bug Something isn't working core lang:ruby labels Sep 3, 2021
@aryx aryx self-assigned this Sep 3, 2021
aryx added a commit that referenced this issue Sep 28, 2021
This closes #3811

test plan:
test file included
aryx added a commit that referenced this issue Sep 29, 2021
* [Ruby] treat 'foo' as an hidden function call

This closes #3811

test plan:
test file included

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core lang:ruby
Development

Successfully merging a pull request may close this issue.

4 participants