summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-11-02 22:47:37 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-11-03 15:19:28 +0000
commitcdb410f688a15781524b701689747f2e186028b4 (patch)
treef4c8970d4e6db8a154bb1924096f4785ab8099fc /test/ruby
parentc44c982c9332a2671d65d48273629fc265ddf530 (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.rb1
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