diff options
| author | Go Saito <[email protected]> | 2015-03-05 17:20:55 +0900 |
|---|---|---|
| committer | Go Saito <[email protected]> | 2015-03-05 17:41:34 +0900 |
| commit | 16b5986d14863dc6a60be77deb9c714558eaf939 (patch) | |
| tree | 1c20f55ba3dbcd3bdea4a325a90a96eb4f36e2e0 /src/vm.c | |
| parent | 7d67c573d78e765a8f84c47c193127bb60fc7414 (diff) | |
| download | mruby-16b5986d14863dc6a60be77deb9c714558eaf939.tar.gz mruby-16b5986d14863dc6a60be77deb9c714558eaf939.zip | |
stack_extend in mrb_f_send
mrb_f_send needs stack_extend like OP_SEND
Signed-off-by: Go Saito <[email protected]>
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -472,6 +472,13 @@ mrb_f_send(mrb_state *mrb, mrb_value self) return p->body.func(mrb, self); } + if (ci->argc < 0) { + stack_extend(mrb, (p->body.irep->nregs < 3) ? 3 : p->body.irep->nregs, 3); + } + else { + stack_extend(mrb, p->body.irep->nregs, ci->argc+2); + } + ci->nregs = p->body.irep->nregs; ci = cipush(mrb); ci->nregs = 0; |
