1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_insnhelper.c (vm_yield_with_cfunc): check block has Proc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2008-12-25 03:49:09 +00:00
parent b8db90f35a
commit f6e435fe87
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Dec 25 12:44:27 2008 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_yield_with_cfunc): check block has Proc.
Thu Dec 25 05:53:01 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* template/id.h.tmpl, id.h (ruby_method_ids): not depend on if

View file

@ -661,7 +661,12 @@ vm_yield_with_cfunc(rb_thread_t *th, const rb_block_t *block,
}
if (blockptr) {
blockarg = vm_make_proc(th, blockptr, rb_cProc);
if (blockptr->proc) {
blockarg = blockptr->proc;
}
else {
blockarg = vm_make_proc(th, blockptr, rb_cProc);
}
}
else {
blockarg = Qnil;