diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2014-04-20 09:01:04 +0000 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2014-04-20 09:01:04 +0000 |
commit | 6ecf40e1fa1b2c55f63d0ccb46bce2fca73b40ad (patch) | |
tree | 368a0326bcf36bc7e06cbbe7a1d55b752afd86ba /vm_eval.c | |
parent | cb3ea602294b5038b5f7ac21d3875a2b52342956 (diff) | |
parent | 680d09b61ea7d850e27944311723a40c596e5d95 (diff) | |
download | ruby-baserock/ps/proto-web-system.tar.gz |
Merge commit '680d09' into baserock/ps/proto-web-systembaserock/ps/proto-web-system
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -694,6 +694,23 @@ rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv) return rb_call(recv, mid, argc, argv, CALL_PUBLIC); } +VALUE +rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE pass_procval) +{ + if (!NIL_P(pass_procval)) { + rb_thread_t *th = GET_THREAD(); + rb_block_t *block = 0; + + rb_proc_t *pass_proc; + GetProcPtr(pass_procval, pass_proc); + block = &pass_proc->block; + + th->passed_block = block; + } + + return rb_call(recv, mid, argc, argv, CALL_PUBLIC); +} + static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope) { |