Bug #1283 ยป vm_eval.patch
| vm_eval.c (working copy) | ||
|---|---|---|
|
return yield_under(mod, mod, rb_ary_new4(argc, argv));
|
||
|
}
|
||
|
NORETURN(static VALUE rb_f_throw _((int, VALUE *)));
|
||
|
NORETURN(static void rb_f_throw _((int, VALUE *)));
|
||
|
/*
|
||
|
* call-seq:
|
||
| ... | ... | |
|
* <code>Kernel::catch</code>.
|
||
|
*/
|
||
|
static VALUE
|
||
|
static void
|
||
|
rb_f_throw(int argc, VALUE *argv)
|
||
|
{
|
||
|
VALUE tag, value;
|
||
| ... | ... | |
|
th->errinfo = NEW_THROW_OBJECT(tag, 0, TAG_THROW);
|
||
|
JUMP_TAG(TAG_THROW);
|
||
|
#ifndef __GNUC__
|
||
|
return Qnil; /* not reached */
|
||
|
#endif
|
||
|
}
|
||
|
void
|
||
| ... | ... | |
|
rb_define_global_function("block_given?", rb_f_block_given_p, 0);
|
||
|
rb_define_global_function("catch", rb_f_catch, -1);
|
||
|
rb_define_global_function("throw", rb_f_throw, -1);
|
||
|
rb_define_global_function("throw", (VALUE (*)())rb_f_throw, -1);
|
||
|
rb_define_global_function("loop", rb_f_loop, 0);
|
||