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

Lint/DefEndAlignment, Lint/UselessComparison,Style/SpaceAroundOperators failing on super block #2784

Closed
jgeiger opened this issue Feb 4, 2016 · 3 comments

Comments

@jgeiger
Copy link

jgeiger commented Feb 4, 2016

Seems there's an issue when parsing super with a block.

class Thing
  def send_command
    super { |response| }
  end
end
class Thing
  def send_command
    super do |response|
    end
  end
end
1 file inspected, no offenses detected

3 errors occurred:
An error occurred while Lint/DefEndAlignment cop was inspecting /app/app/models/thing.rb.
An error occurred while Lint/UselessComparison cop was inspecting /app/app/models/thing.rb.
An error occurred while Style/SpaceAroundOperators cop was inspecting /app/app/models/thing.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.2.4 x86_64-linux)
Finished in 0.1553650630012271 seconds
@turboladen
Copy link

I'm getting the same, plus some addition errors when used with super blocks (only happened after updating from 0.36 to 0.37).

An error occurred while Lint/DefEndAlignment cop was inspecting [redacted]
An error occurred while Lint/UselessComparison cop was inspecting [redacted]
An error occurred while Style/DotPosition cop was inspecting [redacted]
An error occurred while Style/IndentationWidth cop was inspecting [redacted]
An error occurred while Style/MultilineMethodCallIndentation cop was inspecting [redacted]
An error occurred while Style/MultilineOperationIndentation cop was inspecting [redacted]
An error occurred while Style/SpaceAroundOperators cop was inspecting [redacted]

@alexdowad
Copy link
Contributor

Fixed in open PR.

@rrosenblum
Copy link
Contributor

@turboladen, I am seeing the same thing as you. I expect that @alexdowad's PR, #2784, will fix the issues with the other cops as well

@bbatsov bbatsov closed this as completed in a4645cc 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

4 participants