summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-07 07:36:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-07 07:36:40 +0000
commit6d481a4ae440532dcf674adf910c5cfa802f4679 (patch)
tree9eb994643aa02d75494ab17b10f33eee31bf8a9c /parse.y
parent954826f7a84722628b5386868dfdf7da2f4bd58a (diff)
* hash.c (env_clear): new Hash compatible method.
* hash.c (env_shift): ditto. * hash.c (env_invert): ditto. * hash.c (env_replace): ditto. * hash.c (env_update): ditto. * array.c (rb_ary_join): dispatch based on "to_str". * array.c (rb_ary_times): ditto. * array.c (rb_ary_equal): ditto. * process.c (rb_f_exec): dispatch based on "to_ary". * eval.c (umethod_bind): exact class match is not required. relax the restriction to subclasses. * eval.c (rb_eval): call "inherited" before executing class body. * class.c (rb_define_class): call "inherited" after defining the constant. * class.c (rb_define_class_under): ditto. * eval.c (massign): expand first element if RHS is an array and its size is 1, and LHS has concrete assignment target (i.e. LHS has target(s) other than *var). * eval.c (massign): avoid unnecessary avalue/svalue conversion. * eval.c (rb_yield_0): ditto * array.c (rb_ary_update): do not allocate unused array if rpl is nil (i.e. merely removing elements). * io.c (io_read): should resize supplied string if it's shorter than expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y15
1 files changed, 3 insertions, 12 deletions
diff --git a/parse.y b/parse.y
index 9e1b5b5..0309b41 100644
--- a/parse.y
+++ b/parse.y
@@ -137,7 +137,6 @@ static NODE *new_evstr();
static NODE *call_op();
static int in_defined = 0;
-static NODE *yield_args();
static NODE *ret_args();
static NODE *arg_blk_pass();
static NODE *new_call();
@@ -553,7 +552,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
}
| mlhs '=' arg_value
{
- $1->nd_value = NEW_RESTARY($3);
+ $1->nd_value = $3;
$$ = $1;
}
| mlhs '=' mrhs
@@ -695,7 +694,7 @@ command : operation command_args %prec tLOWEST
}
| kYIELD command_args
{
- $$ = NEW_YIELD(yield_args($2));
+ $$ = NEW_YIELD(ret_args($2));
fixpos($$, $2);
}
;
@@ -1404,7 +1403,7 @@ primary : literal
}
| kYIELD '(' call_args ')'
{
- $$ = NEW_YIELD(yield_args($3));
+ $$ = NEW_YIELD(ret_args($3));
}
| kYIELD '(' ')'
{
@@ -5198,14 +5197,6 @@ ret_args(node)
node = node->nd_head;
}
}
- return node;
-}
-
-static NODE *
-yield_args(node)
- NODE *node;
-{
- node = ret_args(node);
if (node && nd_type(node) == NODE_RESTARY) {
nd_set_type(node, NODE_REXPAND);
}