diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-13 10:03:34 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-13 10:03:34 +0900 |
| commit | 09eae5ceb2e9e7e509864091e2400af4ca3bfce1 (patch) | |
| tree | fb21bfd6ce9af97b6765f3ceb244df3e00b5bbda /src/vm.c | |
| parent | c3b79e11f37ce757bfd4d3715fb4ce3d31aa571d (diff) | |
| download | mruby-09eae5ceb2e9e7e509864091e2400af4ca3bfce1.tar.gz mruby-09eae5ceb2e9e7e509864091e2400af4ca3bfce1.zip | |
move no block check to mrb_yield_internal
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -392,6 +392,9 @@ mrb_yield_internal(mrb_state *mrb, mrb_value b, int argc, mrb_value *argv, mrb_v int n = mrb->ci->nregs; mrb_value val; + if (mrb_nil_p(b)) { + mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given"); + } p = mrb_proc_ptr(b); ci = cipush(mrb); ci->mid = mid; |
