From 0316e666c07d020fac267e0a76952cf0dae07190 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Tue, 5 Dec 2023 11:31:12 -0500 Subject: [PRISM] Fix ReturnNodes This code is almost exactly the same (fixed variable names) as what exists already in compile.c --- test/ruby/test_compile_prism.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') 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 ############################################################################ -- cgit v1.2.3