diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-05 11:31:12 -0500 |
|---|---|---|
| committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-06 12:25:49 -0500 |
| commit | 0316e666c07d020fac267e0a76952cf0dae07190 (patch) | |
| tree | e9c8dbc78a641fa6be4cc20b2df2b313763f9f3d /test/ruby | |
| parent | 12e3b07455fea0e99e6aaf1893a7883fb2b0197e (diff) | |
[PRISM] Fix ReturnNodes
This code is almost exactly the same (fixed variable names) as
what exists already in compile.c
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 62edb329bc..a707aa5a9c 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -967,6 +967,14 @@ module Prism def test_ReturnNode assert_prism_eval("def return_node; return 1; end") + assert_prism_eval(<<-CODE) + def self.prism_test_return_node + [1].each do |e| + return true + end + end + prism_test_return_node + CODE end ############################################################################ |
