* parse.y (parser_yylex): should set command_start after block

starting "do"s and braces.  [ruby-core:10916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-04-16 08:12:51 +00:00
Родитель 0a612b8807
Коммит 380ea10dfa
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -8,6 +8,11 @@ Mon Apr 16 16:49:32 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_seek): consistent behavior with
IO#seek. patch by sheepman in [ruby-dev:30710].
Mon Apr 16 16:34:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (parser_yylex): should set command_start after block
starting "do"s and braces. [ruby-core:10916]
Mon Apr 16 10:51:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_each_with_index): each_with_index to forward

Просмотреть файл

@ -6444,6 +6444,7 @@ parser_yylex(struct parser_params *parser)
COND_PUSH(0);
CMDARG_PUSH(0);
lex_state = EXPR_BEG;
if (c != tLBRACE) command_start = Qtrue;
return c;
case '\\':
@ -6765,6 +6766,7 @@ parser_yylex(struct parser_params *parser)
return kw->id[0];
}
if (kw->id[0] == keyword_do) {
command_start = Qtrue;
if (lpar_beg && lpar_beg == paren_nest) {
lpar_beg = 0;
--paren_nest;