aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-22 07:14:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-22 07:14:32 +0000
commit877acd03f60c76e94da377ec5838fd5bb95725d7 (patch)
tree557e8cff9e08198799b642475d83c6959c12f68f /compile.c
parent53106bd5c3f54e0f922a7325875406f7c724153d (diff)
downloadruby-877acd03f60c76e94da377ec5838fd5bb95725d7.tar.gz
* 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/trunk@23815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index e8075f89a6..710e00d612 100644
--- a/compile.c
+++ b/compile.c
@@ -1089,7 +1089,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) {
@@ -1113,6 +1113,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;
@@ -3013,7 +3014,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);