Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::Translation::RubyParser::Compiler#visit_write_value
visit_write_value(node)
lib/prism/translation/ruby_parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/translation/ruby_parser.rb, line 1590
def visit_write_value(node)
if node.is_a?(ArrayNode) && node.opening_loc.nil?
if node.elements.length == 1 && node.elements.first.is_a?(SplatNode)
s(node, :svalue, visit(node.elements.first))
else
s(node, :svalue, visit(node))
end
else
visit(node)
end
end
Visit the value of a write, which will be on the right-hand side of a write operator. Because implicit arrays can have splats, those could potentially be wrapped in an svalue node.