mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix argument forwarding in mrb_exec_irep()
C to Ruby calls using `mrb_exec_irep()` were not forwarding arguments. There was also a problem in setting the target class and method ID, which is also fixed. This issue was discovered during the work to fix #6389.
This commit is contained in:
@@ -828,7 +828,8 @@ mrb_exec_irep(mrb_state *mrb, mrb_value self, struct RProc *p)
|
||||
}
|
||||
else {
|
||||
mrb_int keep = ci_bidx(ci) + 1; /* receiver + block */
|
||||
ret = mrb_top_run(mrb, p, self, keep);
|
||||
cipush(mrb, 0, CINFO_SKIP, CI_TARGET_CLASS(ci), p, NULL, ci->mid, ci->n|(ci->nk<<4));
|
||||
ret = mrb_vm_run(mrb, p, self, keep);
|
||||
}
|
||||
if (mrb->exc && mrb->jmp) {
|
||||
mrb_exc_raise(mrb, mrb_obj_value(mrb->exc));
|
||||
|
||||
Reference in New Issue
Block a user