From 85ad1025328989bb4e10436aed121b9136b0c8bf Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Mon, 30 Oct 2023 17:57:27 -0300 Subject: [PRISM] Implement compilation for PostExecutionNode This commit implements compilation for the PostExeuctionNode by using the ScopeNode to create child iseqs where appropriate. --- test/ruby/test_compile_prism.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') 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") -- cgit v1.2.3