summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJemma Issroff <[email protected]>2023-12-01 13:00:20 -0500
committerJemma Issroff <[email protected]>2023-12-01 13:23:23 -0500
commit2a8d9c59ff151e8e2274e5f788745e070111b8ab (patch)
tree23d0f35c24bb73f613927dda6e38ccfe215c8d27 /test
parentd6584a02011120c15b520fa08e5e5f0132b686de (diff)
[PRISM] Account for RescueNodes with no statements
We need a PUTNIL if a RescueNode has no statements.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_compile_prism.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 2786e2052d..f9f42ce7ec 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -794,6 +794,12 @@ module Prism
CODE
assert_prism_eval(<<~CODE)
begin
+ raise StandardError
+ rescue StandardError => e
+ end
+ CODE
+ assert_prism_eval(<<~CODE)
+ begin
1
rescue StandardError => e
e