mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm.c (vm_exec): returning from lambda runs ensure section.
[Bug #1729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c29206461f
commit
c8909ba601
2 changed files with 22 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Aug 13 21:01:03 2009 wanabe <s.wanabe@gmail.com>
|
||||
|
||||
* vm.c (vm_exec): returning from lambda runs ensure section.
|
||||
[Bug #1729]
|
||||
|
||||
Thu Aug 13 18:40:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (RUBY_CHECK_SIZEOF): set cross_compiling to yes
|
||||
|
|
13
vm.c
13
vm.c
|
@ -1134,11 +1134,24 @@ vm_exec(rb_thread_t *th)
|
|||
SET_THROWOBJ_STATE(err, state = TAG_BREAK);
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < cfp->iseq->catch_table_size; i++) {
|
||||
entry = &cfp->iseq->catch_table[i];
|
||||
if (entry->start < epc && entry->end >= epc) {
|
||||
if (entry->type == CATCH_TYPE_ENSURE) {
|
||||
catch_iseqval = entry->iseq;
|
||||
cont_pc = entry->cont;
|
||||
cont_sp = entry->sp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!catch_iseqval) {
|
||||
result = GET_THROWOBJ_VAL(err);
|
||||
th->errinfo = Qnil;
|
||||
th->cfp += 2;
|
||||
goto finish_vme;
|
||||
}
|
||||
}
|
||||
/* through */
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue