Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::DesugarCompiler#desugar_or_write_node
desugar_or_write_node(node, read_class, write_class, *arguments)
lib/prism/desugar_compiler.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/prism/desugar_compiler.rb, line 177
def desugar_or_write_node(node, read_class, write_class, *arguments)
OrNode.new(
read_class.new(*arguments, node.name_loc),
write_class.new(*arguments, node.name_loc, node.value, node.operator_loc, node.location),
node.operator_loc,
node.location
)
end
Desugar ‘x ||= y` to `x || x = y`