diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-14 07:26:07 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-14 07:26:07 +0000 |
commit | 3e3953cd66b2204c12b779b73192d7f025019cb5 (patch) | |
tree | d98e182cc87baa01fb1d38b7dd4d10ec599db708 /insnhelper.ci | |
parent | 34530b1ad317cb522233c72cb4dc0895a0f9cf6f (diff) | |
download | ruby-3e3953cd66b2204c12b779b73192d7f025019cb5.tar.gz |
* insnhelper.ci (vm_expandarray): assignment should be placed
after creating new array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.ci')
-rw-r--r-- | insnhelper.ci | 4 |
1 files changed, 3 insertions, 1 deletions
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); |