diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 16:08:04 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 16:08:04 +0000 |
commit | ba71368071c85eec4413e7a057ecba9831f923d0 (patch) | |
tree | d041d008f9df4e96c97ac452a8a677537572c408 /compile.c | |
parent | c126c95c719cfa564c0750a64f877a5ac02ae905 (diff) |
merges r23815 from trunk into ruby_1_9_1.
--
* compile.c (iseq_set_arguments, iseq_compile_each): internal
arrays must be hidden. [ruby-dev:38613]
* vm.c (Init_top_self): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1088,7 +1088,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args) if (node_opt) { NODE *node = node_opt; LABEL *label; - VALUE labels = rb_ary_new(); + VALUE labels = rb_ary_tmp_new(1); int i = 0, j; while (node) { @@ -1112,6 +1112,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args) for (j = 0; j < i; j++) { iseq->arg_opt_table[j] &= ~1; } + rb_ary_clear(labels); } else { iseq->arg_opts = 0; @@ -3010,7 +3011,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) DECL_ANCHOR(head); DECL_ANCHOR(body_seq); DECL_ANCHOR(cond_seq); - VALUE special_literals = rb_ary_new(); + VALUE special_literals = rb_ary_tmp_new(1); INIT_ANCHOR(head); INIT_ANCHOR(body_seq); |