6#include "eval_intern.h"
11rb_call_end_proc(
VALUE data)
43 rb_raise(rb_eArgError,
"called without a block");
46 rb_set_end_proc(rb_call_end_proc, proc);
59rb_set_end_proc(
void (*func)(
VALUE),
VALUE data)
65 if (th->top_wrapper) {
66 list = &ephemeral_end_procs;
84 rb_gc_mark(link->data);
87 link = ephemeral_end_procs;
89 rb_gc_mark(link->data);
99 VALUE errinfo = *errp;
101 while ((link = *procs) != 0) {
105 (*endproc.func) (endproc.data);
113 enum ruby_tag_type state;
114 volatile VALUE errinfo = ec->errinfo;
115 volatile bool finished =
false;
119 if ((state = EC_EXEC_TAG()) == TAG_NONE) {
120 exec_end_procs_chain(&ephemeral_end_procs, &ec->errinfo);
121 exec_end_procs_chain(&end_procs, &ec->errinfo);
125 if (state != TAG_NONE) {
126 error_handle(ec, ec->errinfo, state);
127 if (!
NIL_P(ec->errinfo)) errinfo = ec->errinfo;
131 ec->errinfo = errinfo;
#define rb_define_global_function(mid, func, arity)
Defines rb_mKernel #mid.
int rb_block_given_p(void)
Determines if the current method is given a block.
#define ALLOC
Old name of RB_ALLOC.
#define xfree
Old name of ruby_xfree.
#define NIL_P
Old name of RB_NIL_P.
VALUE rb_proc_call(VALUE recv, VALUE args)
Evaluates the passed proc with the passed arguments.
VALUE rb_block_proc(void)
Constructs a Proc object from implicitly passed components.
#define _(args)
This was a transition path from K&R to ANSI.
uintptr_t VALUE
Type that represents a Ruby object.