diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-07 17:45:24 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-07 17:45:24 +0900 |
| commit | a61def802e025ddc431ded0e6982cd1e25bd356f (patch) | |
| tree | 766bc4819630b3b1915997a8ae9dd7ef41643c37 | |
| parent | 40e6cdcb5c9eb2ab3a645c9e27ec85db2b81ecb3 (diff) | |
| download | mruby-a61def802e025ddc431ded0e6982cd1e25bd356f.tar.gz mruby-a61def802e025ddc431ded0e6982cd1e25bd356f.zip | |
return statement should terminate execution of a method defined by define_method
| -rw-r--r-- | src/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c index 6d77f24e6..bd55c1f71 100644 --- a/src/class.c +++ b/src/class.c @@ -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; } |
