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

Can not parse def func(**) #1201

Closed
akicho8 opened this issue Jul 11, 2014 · 2 comments · Fixed by #1206
Closed

Can not parse def func(**) #1201

akicho8 opened this issue Jul 11, 2014 · 2 comments · Fixed by #1206

Comments

@akicho8
Copy link

akicho8 commented Jul 11, 2014

$ cat test.rb
def f(a, **)
end

$ rubocop -d test.rb
Inspecting 1 file
Scanning /private/tmp/test.rb
For /private/tmp: configuration from /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/config/default.yml
Inheriting configuration from /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/config/enabled.yml
Inheriting configuration from /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/config/disabled.yml
An error occurred while VariableForce cop was inspecting /private/tmp/test.rb.
undefined method `to_sym' for nil:NilClass
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/lib/rubocop/cop/variable_force/variable.rb:24:in `initialize'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/lib/rubocop/cop/variable_force/variable_table.rb:49:in `new'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubocop-0.23.0/lib/rubocop/cop/variable_force/variable_table.rb:49:in `declare_variable'

$ rubocop -V
0.23.0 (using Parser 2.1.9, running on ruby 2.1.1 x86_64-darwin11.0)
@yujinakayama
Copy link
Collaborator

Thanks for the report. I'll take a look.

@akicho8
Copy link
Author

akicho8 commented Jul 13, 2014

Thanks. Now able to parse. 👍

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

Successfully merging a pull request may close this issue.

2 participants