-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
nil-reference exception in AlignHash #496
Comments
This particular cop is new, so you might very well be the first person who has encountered this problem. @jonas054 would you take a look at it? |
Btw, it's likely something Rubinius specific, since I cannot reproduce the bug with MRI 1.9, MRI 2.0 and JRuby 1.7.4. |
OK, I'll see what I can do. |
I was able to reproduce it on both 1.9 and 2.0 MRI, I'll add dumps in a gist (since they're big), and link it shortly (my internet is spotty at the moment). You should also be able to reproduce it by running |
The gist: https://gist.github.com/jfredett/6623274 |
Thanks @jfredett for the detailed description of the error! |
No problem, I poked around the cop-code a bit, but haven't had opportunity to try to fix it. My guess is that it's because the particular line is of the form: foo.bar(key: nil).other_thing and in particular, the |
Yes, you're in the right place. I've found the problem and will make a pull request shortly. |
Single key/value pair when configuration is `table` for '=>' and `separator` for `:`. Fixes rubocop#496.
I received the following exception on the following code:
Code:
The output of
rubocop -d
wasI also tried (and received the same failure) on 1.9.3 and 2.0.0, latest patches -- this failure is on Rubinius. The trace requested that I post it here, I feel like this is something someone probably has run into before, but I didn't see any issues after a bit of searching that were similar.
The text was updated successfully, but these errors were encountered: