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

SpaceAroundOperators fails on Foo[] call #2774

Closed
mseppae opened this issue Feb 4, 2016 · 0 comments
Closed

SpaceAroundOperators fails on Foo[] call #2774

mseppae opened this issue Feb 4, 2016 · 0 comments

Comments

@mseppae
Copy link

mseppae commented Feb 4, 2016

Faced this breakage within our code when initializing empty Hpricot elements array with Hpricot::Elements[]

Here is a failings sample

class Foo
  def self.[](*args)
    p args
  end
end

Foo['a', 'b']
Foo[] # Fails

Console output

mseppae@Markos-MBP % rubocop test.rb
Inspecting 1 file
An error occurred while Style/SpaceAroundOperators cop was inspecting /Path/to/test.rb.
To see the complete backtrace run rubocop -d.
.

1 file inspected, no offenses detected

1 error occurred:
An error occurred while Style/SpaceAroundOperators cop was inspecting /Path/to/test.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.37.0 (using Parser 2.3.0.2, running on ruby 2.1.7 x86_64-darwin14.0)
@bbatsov bbatsov closed this as completed in e7fb07a Feb 9, 2016
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