summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJemma Issroff <[email protected]>2023-10-30 17:57:27 -0300
committerJemma Issroff <[email protected]>2023-10-31 12:51:06 -0300
commit85ad1025328989bb4e10436aed121b9136b0c8bf (patch)
tree1f882ed547a7f21ad179bd8deba02bd2dcafcbc5 /test/ruby
parentb5d54fc15955c636cc37b76931a6e3ce1d209f70 (diff)
[PRISM] Implement compilation for PostExecutionNode
This commit implements compilation for the PostExeuctionNode by using the ScopeNode to create child iseqs where appropriate.
Diffstat (limited to 'test/ruby')
-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 4cb82c2bae..18637dc71a 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -640,6 +640,12 @@ module Prism
assert_equal ruby_eval, prism_eval
end
+ def test_PostExecutionNode
+ assert_prism_eval("END { 1 }")
+ assert_prism_eval("END { @b }; @b = 1")
+ assert_prism_eval("END { @b; 0 }; @b = 1")
+ end
+
def test_ProgramNode
assert_prism_eval("")
assert_prism_eval("1")