diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-07 10:08:16 -0500 |
---|---|---|
committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-07 10:34:39 -0500 |
commit | b8df6b9e01d8971235ea42fc9098ce392f791928 (patch) | |
tree | 04acf865693f8a6d287bfd043af23babbf613b09 /test | |
parent | cbc0e0bef08f9389f5bbe76de016795f01c3bc76 (diff) | |
download | ruby-b8df6b9e01d8971235ea42fc9098ce392f791928.tar.gz |
[PRISM] Don't pop arguments on a return node
Since ReturnNodes don't get popped, their arguments shouldn't either
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_compile_prism.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 97ee5c2f70..42e2ebbf00 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -1009,6 +1009,15 @@ module Prism end prism_test_return_node CODE + assert_prism_eval(<<-CODE) + def self.prism_test_return_node + [1].map do |i| + return i if i == 1 + 2 + end + end + prism_test_return_node + CODE end ############################################################################ |