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

Handle inner method definitions, in 4 possible styles #104

Closed
wants to merge 2 commits into from

Conversation

k3rni
Copy link
Contributor

@k3rni k3rni commented Mar 18, 2020

This addresses #92. However, having implemented it, I'm somewhat against including it, for two reasons:

  1. Defining nested methods like this is usually a code smell. While ripper isn't a lint tool, leaving this unsupported makes it have an opinion on things. Rubocop flags it as such
  2. More importantly, this requires parsing a method's body, which may have side effect I didn't consider (probably generating some useless symbols from itsinsides). A sub-parser that rejects all but method definitions inside could help. But this PR uses the naive approach.

Feel free to close it, and keep as a discussion item to point to if that reappears :)

@mislav
Copy link
Collaborator

mislav commented May 5, 2020

Thank you for exploring this! 💖

@mislav mislav closed this May 5, 2020
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 this pull request may close these issues.

2 participants