summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-11-02 23:29:20 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-11-07 14:03:57 +0000
commit8ef7f273218ea0bbbdb1d32e34459cfbf342df97 (patch)
tree5db5e04a27104a9a4455a753e5052e82c7296286 /test
parent237b85c25603a7bccc2bd13dc8da561ca687cc9d (diff)
[PRISM] CompileEnsureNode
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_compile_prism.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 911b126e73..f846009c05 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -587,6 +587,11 @@ module Prism
assert_prism_eval("while true; break 1; end")
end
+ def test_EnsureNode
+ assert_prism_eval("begin; 1; ensure; 2; end")
+ assert_prism_eval("begin; 1; begin; 3; ensure; 4; end; ensure; 2; end")
+ end
+
def test_NextNode
# TODO:
# assert_prism_eval("2.times do |i|; next if i == 1; end")