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

Crash "missing brace not found" #51

Closed
lee-dohm opened this issue Apr 13, 2013 · 2 comments
Closed

Crash "missing brace not found" #51

lee-dohm opened this issue Apr 13, 2013 · 2 comments

Comments

@lee-dohm
Copy link

Minimal Repro

require 'logger'

logger = Logger.new(STDOUT)
logger.debug { "foo #{logger}" }

Fails on line 4 column 13 with the message "missing brace not found". Curiously, column 13 is the space character before the first brace on that line, not the brace itself. Could there also be an off-by-one error in calculating the column for exceptions?

@jonas054
Copy link
Collaborator

I think you're running an older version of rubocop (with ruby 2.0) and have encountered a bug previously reported in issue #41 and corrected in rubocop-0.4.1. Also column numbers start at 0, unlike line numbers, which start at 1. So there's a left brace at column 13.

@lee-dohm
Copy link
Author

You are correct. Updating to the latest version of rubocop fixed the crash. Thanks!

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