aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 9903bcc176..acb7d7999d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1235,7 +1235,7 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
{
int is_splat = flag & 0x01;
rb_num_t space_size = num + is_splat;
- VALUE *base = cfp->sp;
+ VALUE *base = cfp->sp - 1;
const VALUE *ptr;
rb_num_t len;
const VALUE obj = ary;
@@ -1250,8 +1250,6 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
len = (rb_num_t)RARRAY_LEN(ary);
}
- cfp->sp += space_size;
-
if (flag & 0x02) {
/* post: ..., nil ,ary[-1], ..., ary[0..-num] # top */
rb_num_t i = 0, j;