mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c: packed arguments length may be zero for send method.
This commit is contained in:
@@ -689,9 +689,11 @@ mrb_f_send(mrb_state *mrb, mrb_value self)
|
||||
regs = mrb->c->ci->stack+1;
|
||||
|
||||
if (n == 0) {
|
||||
argnum_error:
|
||||
mrb_argnum_error(mrb, 0, 1, -1);
|
||||
}
|
||||
else if (n == 15) {
|
||||
if (RARRAY_LEN(regs[0]) == 0) goto argnum_error;
|
||||
name = mrb_obj_to_sym(mrb, RARRAY_PTR(regs[0])[0]);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user