diff options
| author | Matt Valentine-House <matt@eightbitraptor.com> | 2023-11-02 22:47:37 +0000 |
|---|---|---|
| committer | Matt Valentine-House <matt@eightbitraptor.com> | 2023-11-03 15:19:28 +0000 |
| commit | cdb410f688a15781524b701689747f2e186028b4 (patch) | |
| tree | f4c8970d4e6db8a154bb1924096f4785ab8099fc /test/ruby | |
| parent | c44c982c9332a2671d65d48273629fc265ddf530 (diff) | |
[PRISM] Fix stack consistency with Popped begin
When a begin node is popped it only needs to putnil if that nil is going
to be the return value, otherwise it can successfully be optimised out.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 494b8c87d2..900c868f4c 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -554,6 +554,7 @@ module Prism def test_BeginNode assert_prism_eval("begin; 1; end") + assert_prism_eval("begin; end; 1") end def test_BreakNode |
