diff options
author | Jemma Issroff <[email protected]> | 2023-10-30 17:57:27 -0300 |
---|---|---|
committer | Jemma Issroff <[email protected]> | 2023-10-31 12:51:06 -0300 |
commit | 85ad1025328989bb4e10436aed121b9136b0c8bf (patch) | |
tree | 1f882ed547a7f21ad179bd8deba02bd2dcafcbc5 /test/ruby | |
parent | b5d54fc15955c636cc37b76931a6e3ce1d209f70 (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.rb | 6 |
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") |