From 26d0a2a3d672b9016fdb7b45eeed05e3432fd8e4 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 23 Jan 2015 14:57:08 +0000 Subject: vm_insnhelper.c: break from nested rescue * vm_insnhelper.c (vm_throw_start): search the target to break from a block with nested rescue, from the nested blocks. [ruby-core:67765] [Bug #10775] [Fix GH-820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_block.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb index 6a2ccfc6da..cdc5960a59 100644 --- a/bootstraptest/test_block.rb +++ b/bootstraptest/test_block.rb @@ -597,3 +597,17 @@ assert_equal 'true', %q{ C1.new.foo{} } +assert_equal 'ok', %q{ + 1.times do + begin + raise + rescue + begin + raise + rescue + break + end + end + end + 'ok' +} -- cgit v1.2.3