From 1eeab5c1658ee7ead2d0078a8fd8bb685c48f25e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Jun 2017 14:09:08 +0000 Subject: fix return in toplevel ensure * compile.c (iseq_compile_each0): adjust stack after return in toplevel ensure, when the value is used. [ruby-core:81777] [Bug #13682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 57e0b29162..b2bd688a77 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -977,6 +977,7 @@ eom "#{return}" raise((return; "should not raise")) begin raise; ensure return; end; self + begin raise; ensure return; end and self end; all_assertions(feature4840) do |a| code.each_line do |s| -- cgit v1.2.3