-
Notifications
You must be signed in to change notification settings - Fork 144
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
Possible bug with def obj.foo; end
?
#1435
Labels
bug
Something isn't working
Comments
seven1m
added a commit
to natalie-lang/natalie
that referenced
this issue
Sep 10, 2023
I was trying to get test/natalie/method_test.rb parsing (and passing), but I think I found a few unexpected results from YARP. I think these are bugs, which I filed here: ruby/prism#1435 ruby/prism#1436
seven1m
added a commit
to natalie-lang/natalie
that referenced
this issue
Sep 10, 2023
I was trying to get test/natalie/method_test.rb parsing (and passing), but I found a few unexpected results from YARP. I think these are bugs, which I filed here: ruby/prism#1435 ruby/prism#1436
Yup that's a bug! Looks like we're pushing the new scope too soon. |
seven1m
added a commit
to natalie-lang/natalie
that referenced
this issue
Sep 11, 2023
I was trying to get test/natalie/method_test.rb parsing (and passing), but I found a few unexpected results from YARP. I think these are bugs, which I filed here: ruby/prism#1435 ruby/prism#1436
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following Ruby code produces an unexpected (to me) AST:
...which gives:
Specifically the receiver of the DefNode, e.g.
Is this a bug? I would expect a
LocalVariableReadNode
or maybe aLocalVariableTargetNode
instead of aCallNode
.This is what Whitequark Parser produces:
...vs what it would produce if
o
wasn't a known local variable:The text was updated successfully, but these errors were encountered: