Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::Translation::Ripper#visit_string_node
visit_string_node(node)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/translation/ripper.rb, line 2929
def visit_string_node(node)
if (content = node.content).empty?
bounds(node.location)
on_string_literal(on_string_content)
elsif (opening = node.opening) == "?"
bounds(node.location)
on_CHAR("?#{node.content}")
elsif opening.start_with?("<<~")
heredoc = visit_heredoc_string_node(node.to_interpolated)
bounds(node.location)
on_string_literal(heredoc)
else
bounds(node.content_loc)
tstring_content = on_tstring_content(content)
bounds(node.location)
on_string_literal(on_string_add(on_string_content, tstring_content))
end
end
“foo” ^^^^^