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

RuntimeError for variable reference in begin-end-until #374

Closed
jonas054 opened this issue Jul 18, 2013 · 1 comment · Fixed by #375
Closed

RuntimeError for variable reference in begin-end-until #374

jonas054 opened this issue Jul 18, 2013 · 1 comment · Fixed by #375
Labels

Comments

@jonas054
Copy link
Collaborator

RuboCop crashes when inspecting this program:

begin
  a = (a || 0) + 1
  puts a
end until a > 2

Here's the beginning of the stack trace:

/home/jonas/dev/rubocop/lib/rubocop/cop/variable_inspector.rb:201:in `process_node': Using undeclared local variable "a" at /tmp/begin_end_until.rb:4:11, (lvar :a) (RuntimeError)
    from /home/jonas/dev/rubocop/lib/rubocop/cop/variable_inspector.rb:182:in `block in inspect_variables_in_scope'

Perhaps you can take a look at this @yujinakayama?

@yujinakayama
Copy link
Collaborator

@jonas054 OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants