diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | insnhelper.ci | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Sep 14 16:24:04 2007 Koichi Sasada <ko1@atdot.net> + + * insnhelper.ci (vm_expandarray): assignment should be placed + after creating new array. + Fri Sep 14 16:17:30 2007 Koichi Sasada <ko1@atdot.net> * bootstraptest/runner.rb: add a stress test (-s). diff --git a/insnhelper.ci b/insnhelper.ci index ba12ac6236..7ab7456995 100644 --- a/insnhelper.ci +++ b/insnhelper.ci @@ -1334,7 +1334,7 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, int num, int flag) int is_splat = flag & 0x01; int space_size = num + is_splat; VALUE *base = cfp->sp, *ptr; - volatile VALUE tmp_ary = ary; + volatile VALUE tmp_ary; int len; cfp->sp += space_size; @@ -1342,6 +1342,8 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, int num, int flag) if (TYPE(ary) != T_ARRAY) { ary = rb_ary_to_ary(ary); } + + tmp_ary = ary; ptr = RARRAY_PTR(ary); len = RARRAY_LEN(ary); |