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

Hash value ommission (Ruby-3.1 support) #326

Closed ojab closed 2 years ago

ojab commented 2 years ago

https://rubyreferences.github.io/rubychanges/3.1.html#values-in-hash-literals-and-keyword-arguments-can-be-omitted

x = 1
y = 2
{x:, y:}

should be parsed correctly.

zenspider commented 2 years ago

This has been addressed in the latest release.