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

Anonymous argument passing (Ruby-3.2 support) #338

Closed agrobbin closed 1 year ago

agrobbin commented 1 year ago

I tried to mimic the issues created for the new features introduced in Ruby 3.1, hopefully this is sufficient, but if not please let me know!

https://rubyreferences.github.io/rubychanges/3.2.html#anonymous-arguments-passing-improvements

def foo(*, **)
  bar(*, **)
end

This should be parsed as valid Ruby in 3.2, but at the moment is raising a parsing error.

zenspider commented 1 year ago

this is fixed and will go out in the next release. Thanks for the report!

agrobbin commented 1 year ago

Thanks for the quick fix, @zenspider!