From 8056c2aff75db1ae01268798245d79c1077d0c38 Mon Sep 17 00:00:00 2001 From: Herwin Date: Sat, 12 Oct 2024 10:21:46 +0200 Subject: [PATCH] Fix call to Prism::StringNode in multiline eval parsing This fixes the spec language/regexp/back-references_spec.rb --- lib/natalie/compiler/macro_expander.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/natalie/compiler/macro_expander.rb b/lib/natalie/compiler/macro_expander.rb index cbc8bbfd0..4c734d8bd 100644 --- a/lib/natalie/compiler/macro_expander.rb +++ b/lib/natalie/compiler/macro_expander.rb @@ -163,11 +163,12 @@ def macro_eval(expr:, current_path:, locals:, **) node = Prism::StringNode.new( nil, nil, + node.location, + 0, node.opening_loc, node.opening_loc, node.closing_loc, node.parts.map(&:unescaped).join, - node.location, ) end if node.type == :string_node