seattlerb / ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
http://www.zenspider.com/projects/ruby_parser.html
476 stars 100 forks source link

Add Ruby 3.3.0 support #342

Closed torrocus closed 10 months ago

torrocus commented 10 months ago

Initial support for Ruby 3.3

Feedback

I followed the changes for Ruby 3.2, I hope I went in the right direction. Unfortunately, the tests are not yet passed. I will gladly accept help.

torrocus commented 10 months ago

@zenspider I saw that you changed some filenames, so I resolved the conflicts and rebased the code.

torrocus commented 10 months ago

@zenspider Today I did a rebase again and resolved the conflicts.

zenspider commented 10 months ago

I've been working on the same thing. We probably have nearly identical diffs at this point. If you only have 2 failing tests due to error message not quite matching I fixed it with this:

assert_match(/parse error on value \S+ ..end./, e.message)

It is a difference in bison vs lrama error handling I guess?

zenspider commented 10 months ago

Done! Thanks! I'll get a release out shortly... trying to see if I can improve rake compare first.

torrocus commented 10 months ago

It was exactly as you said. Only 2 failed tests. I hope I helped at least a little. I'm happy that Ruby parser now supports Ruby 3.3.