mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2641 from sdottaka/super-fix
Fix an error when calling a method implemented in C by super() with argu...
This commit is contained in:
@@ -1250,7 +1250,12 @@ RETRY_TRY_BLOCK:
|
||||
mrb->c->stack[0] = recv;
|
||||
|
||||
if (MRB_PROC_CFUNC_P(m)) {
|
||||
ci->nregs = 0;
|
||||
if (n == CALL_MAXARGS) {
|
||||
ci->nregs = 3;
|
||||
}
|
||||
else {
|
||||
ci->nregs = n + 2;
|
||||
}
|
||||
mrb->c->stack[0] = m->body.func(mrb, recv);
|
||||
mrb_gc_arena_restore(mrb, ai);
|
||||
if (mrb->exc) goto L_RAISE;
|
||||
|
||||
Reference in New Issue
Block a user