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

undefined method `children' for :do_find:Symbol #2451

Closed
brandonweeks opened this issue Nov 24, 2015 · 1 comment
Closed

undefined method `children' for :do_find:Symbol #2451

brandonweeks opened this issue Nov 24, 2015 · 1 comment

Comments

@brandonweeks
Copy link

rubocop 0.35.1 errors when parsing this file: https://github.com/theforeman/smart-proxy/blob/develop/modules/puppet_proxy/class_scanner_eparser.rb

Specifically this bit:

def find_CallNamedFunctionExpression o
  if o.lambda
    do_find(o.lambda)
  end
end

It looks like "o.lambda" is getting misinterpreted as a lambda.

Full traceback: https://gist.github.com/brandonweeks/e3684b4b882b2b378793
Test case (credit @domcleal): https://gist.github.com/domcleal/e792c526eed7275f6b4b

0.35.1 (using Parser 2.2.3.0, running on ruby 2.2.3 x86_64-darwin14)

@bbatsov bbatsov closed this as completed in 4635cc7 Dec 1, 2015
bbatsov added a commit that referenced this issue Dec 1, 2015
[Fix #2451] Don't treat method calls named 'lambda' as lambdas
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