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

Issue with Ruby 3.1.5 #455

Open
rdimartino opened this issue Apr 23, 2024 · 4 comments
Open

Issue with Ruby 3.1.5 #455

rdimartino opened this issue Apr 23, 2024 · 4 comments

Comments

@rdimartino
Copy link

I noticed this from the test failures on this PR

There's different behavior between Ruby 3.1.4 and 3.1.5

Ruby 3.1.4

❯ rbenv shell 3.1.4
❯ bundle exec stree format -e 'foo::x = 1'
foo.x = 1
❯ bundle exec stree ast -e 'foo::x = 1'
(program (statements ((assign (field (vcall (ident "foo")) :"::" (ident "x")) (int "1")))))

Ruby 3.1.5

❯ rbenv shell 3.1.5
❯ bundle exec stree format -e 'foo::x = 1'
undefined method `comments' for 73:Integer

      operator == :"::" ? [] : operator.comments
                                       ^^^^^^^^^
❯ bundle exec stree ast -e 'foo::x = 1'   
(program (statements ((assign (field (vcall (ident "foo")) 73 (ident "x")) (int "1")))))
@kddnewton
Copy link
Member

Thank you!

@kddnewton
Copy link
Member

Reported here: https://bugs.ruby-lang.org/issues/20449. Looks like this is a bug in the Ruby 3.1.5 backport. I'll put a workaround in here.

@rdimartino
Copy link
Author

Great, thanks! I found the offending commit and submitted a patch ruby/ruby#10610

I've never used the Ruby bug tracker before. Is there something that I should do there too?

@kddnewton
Copy link
Member

Yeah if you want to comment on the redmine ticket if you want with the PR but I can do it as well if you don't want to make an account.

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