From 2796e4ece24f62f7d952a894097726b85bbd6fc8 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Mon, 13 Nov 2023 18:52:03 -0500 Subject: [PRISM] Implement once node for interpolated regex This PR implements the once node on interpolated regexes. There is a bug in Prism where the interpolated regex with the once flag only works when there is not a local variable so the test uses a "1". We'll need to fix that. --- test/ruby/test_compile_prism.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 81b62cf832..0ed9d3e2e0 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -427,6 +427,8 @@ module Prism assert_prism_eval('/pit/me') assert_prism_eval('/pit/ne') + + assert_prism_eval('2.times.map { /#{1}/o }') end def test_StringConcatNode -- cgit v1.2.3