aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-27 14:09:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-27 14:09:08 +0000
commit1eeab5c1658ee7ead2d0078a8fd8bb685c48f25e (patch)
tree6d19af6504aa9e50f72eff9523fe8523dad10e70 /test
parenta42be1e048e9dc7eb5e0453beea678dea95e5194 (diff)
downloadruby-1eeab5c1658ee7ead2d0078a8fd8bb685c48f25e.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb1
1 files changed, 1 insertions, 0 deletions
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|