summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2023-11-13 18:52:03 -0500
committerJemma Issroff <jemmaissroff@gmail.com>2023-11-20 12:42:05 -0800
commit2796e4ece24f62f7d952a894097726b85bbd6fc8 (patch)
tree30797f7f103f5cf0883223068c9d654c49c5827f /test/ruby
parentc5d5929443d58d72cb9688a9fac6487ce17c1e9d (diff)
[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.
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb2
1 files changed, 2 insertions, 0 deletions
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