Skip to content

Handle return when arg is an Array #55

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

Merged
merged 6 commits into from
Apr 22, 2022

Conversation

DRBragg
Copy link
Contributor

@DRBragg DRBragg commented Apr 22, 2022

This PR takes care of handling return nodes when argument isn Array, with or without being wrapped in parens (bonus mode!).

TBH I spent more time messing with this code then actually fixing it. I dont love how it's handling ArrayLiterals inside Parens but everything else I came up with seemed like overkill or an unnecessary abstraction. I'll trust you to make the call on if this code needs to change (which I'm happy to pair on) but for now I wanted to get it working before getting it "right" (or fast)

@kddnewton kddnewton merged commit c779b6c into ruby-syntax-tree:main Apr 22, 2022
@kddnewton
Copy link
Member

I think this is pretty much exactly how I would have handled this. Nice work!

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