summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-20 10:25:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-20 10:25:52 +0000
commitf0f87d6eebfa4ef713ca150f349d9780a3d13a62 (patch)
tree914c1c33c9c82d985e59c9cc466d07564791f208
parentcbaf61b276492532f4348f284322c88fcfe6efb5 (diff)
* parse.y (parser_yylex): fix for tLPAREN_ARG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--parse.y12
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e762f88e75..c3e81bda770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr 20 19:25:50 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): fix for tLPAREN_ARG.
+
Tue Apr 20 12:34:23 2010 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/{core, util}.rb (RFC822_DAYS, RFC822_MONTHS):
diff --git a/parse.y b/parse.y
index 76ed6ca4f0c..d22253bff51 100644
--- a/parse.y
+++ b/parse.y
@@ -7272,10 +7272,8 @@ parser_yylex(struct parser_params *parser)
if (IS_BEG()) {
c = tLPAREN;
}
- else if (space_seen) {
- if (IS_ARG()) {
- c = tLPAREN_ARG;
- }
+ else if (IS_SPCARG(-1)) {
+ c = tLPAREN_ARG;
}
paren_nest++;
COND_PUSH(0);
@@ -7687,9 +7685,9 @@ parser_yylex(struct parser_params *parser)
ID ident = TOK_INTERN(!ENC_SINGLE(mb));
set_yylval_name(ident);
- if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) {
- lex_state = EXPR_VCALL;
- }
+ if (last_state != EXPR_DOT && last_state != EXPR_FNAME && is_local_id(ident)) {
+ lex_state = EXPR_VCALL;
+ }
}
return result;
}