From 54952586fd5ff136843ecf581355a3da5d328f7b Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 3 Jul 2012 10:20:49 +0000 Subject: * proc.c (rb_vm_rewrite_dfp_in_errinfo): Fix `unexpected return' occurs when a proc is called in ensure. [Backport #6460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_flow.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb index d40d814fbc..fc93a5a46c 100644 --- a/bootstraptest/test_flow.rb +++ b/bootstraptest/test_flow.rb @@ -543,6 +543,19 @@ assert_equal %Q{ENSURE\n}, %q{ end end e = Bug5234.new +}], + ['[ruby-dev:45656]', %q{ + class Bug6460 + include Enumerable + def each + begin + yield :foo + ensure + 1.times { Proc.new } + end + end + end + e = Bug6460.new }]].each do |bug, src| assert_equal "foo", src + %q{e.detect {true}}, bug assert_equal "true", src + %q{e.any? {true}}, bug -- cgit v1.2.3