From 69d99b010b739ec48a53ee2f9979ec91b0480931 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 19 Apr 2006 03:02:03 +0000 Subject: * eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1. [ruby-dev:28585] * parse.y (list_concat): revert last change. * parse.y (arg): use NODE_ARGSCAT for placeholder. * lib/getoptlong.rb (GetoptLong::get): RDoc update patch from mathew . [ruby-core:07738] * variable.c (rb_const_set): raise error when no target klass is supplied. [ruby-dev:28582] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index d50f06d10..608da7e82 100644 --- a/parse.y +++ b/parse.y @@ -542,11 +542,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem NODE *args; value_expr($6); - args = NEW_LIST($6); - if ($3 && nd_type($3) != NODE_ARRAY) - $3 = NEW_LIST($3); - $3 = list_append($3, NEW_NIL()); - list_concat(args, $3); + args = arg_concat(NEW_LIST($6), $3); if ($5 == tOROP) { $5 = 0; } @@ -1013,8 +1009,7 @@ arg : lhs '=' arg NODE *args; value_expr($6); - args = NEW_LIST($6); - list_concat(args, $3); + args = arg_concat(NEW_LIST($6), $3); if ($5 == tOROP) { $5 = 0; } @@ -4665,8 +4660,6 @@ list_concat(head, tail) { NODE *last; - if (nd_type(tail) != NODE_ARRAY) - return list_append(head, tail); if (head->nd_next) { last = head->nd_next->nd_end; } -- cgit