summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
-rw-r--r--proc.c20
1 files changed, 20 insertions, 0 deletions
@@ -678,6 +678,7 @@ cfunc_proc_new(VALUE klass, VALUE ifunc)
{
rb_proc_t *proc;
cfunc_proc_t *sproc;
VALUE procval = TypedData_Make_Struct(klass, cfunc_proc_t, &proc_data_type, sproc);
VALUE *ep;
@@ -692,6 +693,7 @@ cfunc_proc_new(VALUE klass, VALUE ifunc)
/* self? */
RB_OBJ_WRITE(procval, &proc->block.as.captured.code.ifunc, ifunc);
proc->is_lambda = TRUE;
return procval;
}
@@ -727,6 +729,7 @@ sym_proc_new(VALUE klass, VALUE sym)
GetProcPtr(procval, proc);
vm_block_type_set(&proc->block, block_type_symbol);
proc->is_lambda = TRUE;
RB_OBJ_WRITE(procval, &proc->block.as.symbol, sym);
return procval;
@@ -2006,6 +2009,21 @@ method_owner(VALUE obj)
return data->owner;
}
void
rb_method_name_error(VALUE klass, VALUE str)
{
@@ -4466,6 +4484,8 @@ Init_Proc(void)
rb_define_method(rb_mKernel, "public_method", rb_obj_public_method, 1);
rb_define_method(rb_mKernel, "singleton_method", rb_obj_singleton_method, 1);
/* UnboundMethod */
rb_cUnboundMethod = rb_define_class("UnboundMethod", rb_cObject);
rb_undef_alloc_func(rb_cUnboundMethod);