summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-02 02:26:03 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-02 02:26:03 +0000
commitf53a94c83124ce44a53e4262cdd30ffa53016f1a (patch)
tree5717bdd70a5bfc613e4a0dd40eb5ad2011da29c5 /compile.c
parent0cc90b386573acd30b2256c7ff72e7da10d77bc3 (diff)
* compile.c: use Qtrue instead of 2.
* vm.c, insns.def: support "lambda" calling convention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12240 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 7f702b93a7..a44dbafd30 100644
--- a/compile.c
+++ b/compile.c
@@ -3702,6 +3702,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
p = p->nd_next, argc++) {
/* count argc */
}
+
if (argc == 1) {
COMPILE(args, "yield with an arg", node->nd_head);
}
@@ -3713,7 +3714,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
if (nd_type(node->nd_head) == NODE_ARGSCAT) {
- if (node->nd_state == 2) {
+ if (node->nd_state == Qtrue) {
flag |= VM_CALL_ARGS_SPLAT_BIT;
}
@@ -3726,7 +3727,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
node->nd_head->nd_body);
}
else if (nd_type(node->nd_head) == NODE_SPLAT) {
- if (node->nd_state == 2) {
+ if (node->nd_state == Qtrue) {
flag |= VM_CALL_ARGS_SPLAT_BIT;
}