summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 14:59:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 14:59:19 +0000
commit38bde8a9e0487db2eeb59227ae90d4391fbf0663 (patch)
tree8ec0f16e80f1a446423108fdc19f7b4dbe66cd1d /parse.y
parent5f0df5186540dd5a6f11063f6e420c86636b235d (diff)
* parse.y (open_args): warning message changed to "don't put space
before argument parentheses". * io.c (argf_read): ARGF.read() should read all argument files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y12
1 files changed, 4 insertions, 8 deletions
diff --git a/parse.y b/parse.y
index 2ee3338..090a8b9 100644
--- a/parse.y
+++ b/parse.y
@@ -1340,14 +1340,12 @@ command_args : {
open_args : call_args
| tLPAREN_ARG {lex_state = EXPR_ENDARG;} ')'
{
- rb_warning("%s (...) interpreted as method call",
- rb_id2name($<id>1));
+ rb_warn("don't put space before argument parentheses");
$$ = 0;
}
| tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} ')'
{
- rb_warning("%s (...) interpreted as method call",
- rb_id2name($<id>1));
+ rb_warn("don't put space before argument parentheses");
$$ = $2;
}
;
@@ -3277,7 +3275,6 @@ arg_ambiguous()
static int
yylex()
{
- static ID last_id = 0;
register int c;
int space_seen = 0;
int cmd_state;
@@ -4029,7 +4026,6 @@ yylex()
}
else if (lex_state == EXPR_ARG) {
c = tLPAREN_ARG;
- yylval.id = last_id;
}
}
COND_PUSH(0);
@@ -4407,8 +4403,8 @@ yylex()
}
}
tokfix();
- last_id = yylval.id = rb_intern(tok());
- if ((dyna_in_block() && rb_dvar_defined(last_id)) || local_id(last_id)) {
+ yylval.id = rb_intern(tok());
+ if ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id)) {
lex_state = EXPR_END;
}
return result;