aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-23 14:57:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-23 14:57:08 +0000
commit26d0a2a3d672b9016fdb7b45eeed05e3432fd8e4 (patch)
treef61c459912636a3c88372ef966df6a5025e5c1ef /vm_insnhelper.c
parente567f351c287dcfdf1c25518cca140d661c01985 (diff)
downloadruby-26d0a2a3d672b9016fdb7b45eeed05e3432fd8e4.tar.gz
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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index f8939b6bf1..c1c4e3f28e 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -609,13 +609,11 @@ vm_throw_start(rb_thread_t * const th, rb_control_frame_t * const reg_cfp, int s
rb_iseq_t *base_iseq = GET_ISEQ();
escape_cfp = reg_cfp;
- search_parent:
- if (base_iseq->type != ISEQ_TYPE_BLOCK) {
+ while (base_iseq->type != ISEQ_TYPE_BLOCK) {
if (escape_cfp->iseq->type == ISEQ_TYPE_CLASS) {
escape_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(escape_cfp);
ep = escape_cfp->ep;
base_iseq = escape_cfp->iseq;
- goto search_parent;
}
else {
ep = VM_EP_PREV_EP(ep);