mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
5f0df51865
commit
38bde8a9e0
3 changed files with 15 additions and 17 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Apr 26 23:34:42 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (open_args): warning message changed to "don't put space
|
||||
before argument parentheses".
|
||||
|
||||
Sat Apr 26 14:25:00 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
|
||||
|
||||
* wince/ : files removed.
|
||||
|
@ -32,6 +37,10 @@ Sat Apr 26 14:25:00 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
|
|||
|
||||
* wince/sys/stat.c : expand relative directory in stat.
|
||||
|
||||
Sat Apr 26 06:33:04 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (argf_read): ARGF.read() should read all argument files.
|
||||
|
||||
Fri Apr 25 18:46:00 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
|
||||
|
||||
* gc.c: STACK_LEVEL_MAX=65535 on mswince.
|
||||
|
|
11
io.c
11
io.c
|
@ -3715,19 +3715,12 @@ argf_read(argc, argv)
|
|||
if (NIL_P(tmp) && next_p != -1) {
|
||||
io_close(current_file);
|
||||
next_p = 1;
|
||||
return str;
|
||||
if (argc == 0) goto retry;
|
||||
}
|
||||
if (NIL_P(tmp) || RSTRING(tmp)->len == 0) return str;
|
||||
else if (NIL_P(str)) str = tmp;
|
||||
else rb_str_append(str, tmp);
|
||||
if (argc == 0) {
|
||||
goto retry;
|
||||
}
|
||||
if (RSTRING(tmp)->len < len) {
|
||||
len -= RSTRING(tmp)->len;
|
||||
argv[0] = LONG2FIX(len);
|
||||
goto retry;
|
||||
}
|
||||
if (argc == 0) goto retry;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
12
parse.y
12
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue