summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-19 04:57:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-19 04:57:58 +0000
commit2835df5a05a011c88e45a60c7a2728e62a3c3dfd (patch)
tree0acc31dae376ec140504c589c18d22baf0a5561b /eval.c
parent1d3fd0024d2e8821e863a39c53c38dfea65b6fa6 (diff)
downloadruby-2835df5a05a011c88e45a60c7a2728e62a3c3dfd.tar.gz
* parse.y (arg): too much NEW_LIST()
* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index c6d0dd711e..4698c34021 100644
--- a/eval.c
+++ b/eval.c
@@ -2213,14 +2213,14 @@ copy_node_scope(node, rval)
# define TMP_ALLOC(n) ALLOCA_N(VALUE,n)
#endif
-#define SETUP_ARGS0(anode,alen,extra) do {\
+#define SETUP_ARGS0(anode,extra) do {\
NODE *n = anode;\
if (!n) {\
argc = 0;\
argv = 0;\
}\
else if (nd_type(n) == NODE_ARRAY) {\
- argc=alen;\
+ argc=anode->nd_alen;\
if (argc > 0) {\
int i;\
n = anode;\
@@ -2245,7 +2245,7 @@ copy_node_scope(node, rval)
}\
} while (0)
-#define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen,0)
+#define SETUP_ARGS(anode) SETUP_ARGS0(anode,0)
#define BEGIN_CALLARGS do {\
struct BLOCK *tmp_block = ruby_block;\
@@ -3540,7 +3540,7 @@ rb_eval(self, n)
recv = rb_eval(self, node->nd_recv);
rval = node->nd_args->nd_head;
- SETUP_ARGS0(node->nd_args->nd_body, node->nd_args->nd_alen-1,1);
+ SETUP_ARGS0(node->nd_args->nd_body, 1);
val = rb_funcall3(recv, aref, argc, argv);
switch (node->nd_mid) {
case 0: /* OR */