summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 07:15:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 07:15:06 +0000
commit868684096079f3e786df517714fe6d795c4647b6 (patch)
treef4534afac345b2b08542fde02b09323861a12d96 /compile.c
parent6200f424a721981d739410ea3937990e3831bc7d (diff)
* compile.c (iseq_compile_each), parse.y (stmt, arg): arg_concat()
on op_asgn was inversed. [ruby-core:25629] [Bug #2050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/compile.c b/compile.c
index 3999e69de6..0b4eb0d061 100644
--- a/compile.c
+++ b/compile.c
@@ -3760,9 +3760,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, nd_line(node), putnil);
}
COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv);
- if (nd_type(node->nd_args->nd_body) != NODE_ZARRAY) {
+ if (nd_type(node->nd_args->nd_head) != NODE_ZARRAY) {
INIT_ANCHOR(args);
- argc = setup_args(iseq, args, node->nd_args->nd_body, &flag);
+ argc = setup_args(iseq, args, node->nd_args->nd_head, &flag);
ADD_SEQ(ret, args);
}
else {
@@ -3795,7 +3795,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
ADD_INSN(ret, nd_line(node), pop);
- COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
+ COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body);
if (!poped) {
ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2));
}
@@ -3819,7 +3819,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_LABEL(ret, lfin);
}
else {
- COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head);
+ COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body);
ADD_SEND(ret, nd_line(node), ID2SYM(id), INT2FIX(1));
if (!poped) {
ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2));