Skip to content

Commit

Permalink
[ruby/prism] Update lib/prism/ripper_compat.rb
Browse files Browse the repository at this point in the history
ruby/prism@2c53e017c1

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
  • Loading branch information
2 people authored and matzbot committed Feb 9, 2024
1 parent f635b4d commit 8688256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prism/ripper_compat.rb
Expand Up @@ -351,7 +351,7 @@ def visit_embedded_statements_node(node)

# Visit a SymbolNode node.
def visit_symbol_node(node)
if node.opening && ['"', "'", "("].include?(node.opening[-1])
if (opening = node.opening) && (['"', "'"].include?(opening[-1]) || opening.start_with?("%s"))
bounds(node.value_loc)
tstring_val = on_tstring_content(node.value.to_s)
return on_dyna_symbol(on_string_add(on_string_content, tstring_val))
Expand Down

0 comments on commit 8688256

Please sign in to comment.