mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
return statement should terminate execution of a method defined by define_method
This commit is contained in:
@@ -1484,6 +1484,7 @@ mod_define_method(mrb_state *mrb, mrb_value self)
|
||||
}
|
||||
p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
|
||||
mrb_proc_copy(p, mrb_proc_ptr(blk));
|
||||
p->flags |= MRB_PROC_STRICT;
|
||||
mrb_define_method_raw(mrb, c, mid, p);
|
||||
return blk;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user