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

Style/OpMethod should not complain about the backticks method #3320

Closed
donv opened this issue Jul 15, 2016 · 1 comment
Closed

Style/OpMethod should not complain about the backticks method #3320

donv opened this issue Jul 15, 2016 · 1 comment

Comments

@donv
Copy link

donv commented Jul 15, 2016

Given the following code:

def `(cmd)
  system cmd
end

Rubocop complains with the following offence:

my_class.rb:40:7: C: Style/OpMethod: When defining the  operator, name its argument other`. (https://github.com/bbatsov/ruby-style-guide#other-arg)
def `(cmd)
      ^^^

I think that "other" is not an intuitive parameter name for the backticks method and that Rubocop should not report it as an offence.

$ rubocop -V
0.41.2 (using Parser 2.3.1.2, running on jruby 2.3.0 java)
Drenmi added a commit to Drenmi/rubocop that referenced this issue Jul 15, 2016
This cop would incorrectly register an offense when the backtick method
argument was not named `other`. This change fixes that.
@donv
Copy link
Author

donv commented Jul 15, 2016

@Drenmi @bbatsov Thanks!

Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
…rubocop#3321)

This cop would incorrectly register an offense when the backtick method
argument was not named `other`. This change fixes that.
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

No branches or pull requests

1 participant