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

Error with Style/ElseAlignment cop #1416

Closed
sferik opened this issue Nov 2, 2014 · 0 comments
Closed

Error with Style/ElseAlignment cop #1416

sferik opened this issue Nov 2, 2014 · 0 comments
Assignees

Comments

@sferik
Copy link
Contributor

sferik commented Nov 2, 2014

This cop chokes on begin…rescue…else…end statements. Here is an reduced code snipped that will cause the RuboCop error:

begin
  raise StandardError.new('Fail (__-){') if rand(2).odd?
rescue StandardError => error
  $stderr.puts error.message
else
  $stdout.puts 'Lucky you!'
end

Here’s a Gist of the full stack trace.

RubyCop version 0.27.0 (using Parser 2.2.0.pre.6, running on ruby 2.1.4 x86_64-darwin14.0)

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

2 participants