summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-26 03:13:06 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-26 03:13:06 +0000
commitd5dc032e33c149daa38e1e9b6b3cef3e580355e1 (patch)
treedaa3fa2035f6721a7acba9d00cb429f6d2b1ad47
parentabfbbcf8e3c49d0f6890973a13affc643e17ef07 (diff)
* parse.y (yylex): modify to accept a code like "m (a){...}".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--parse.y12
2 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a0e634c8fb..e7dbef55dce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 26 12:14:48 2002 Minero Aoki <aamine@loveruby.net>
+
+ * parse.y (yylex): modify to accept a code like "m (a){...}".
+
Thu Jul 25 09:05:02 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* misc/ruby-mode.el (ruby-delimiter): include here document.
diff --git a/parse.y b/parse.y
index 14e38347cf1..2ca171f332f 100644
--- a/parse.y
+++ b/parse.y
@@ -3850,12 +3850,12 @@ yylex()
return c;
case '{':
- if (!IS_ARG()) {
- if (space_seen && lex_state == EXPR_ENDARG)
- c = tLBRACE_ARG;
- if (lex_state != EXPR_END && lex_state != EXPR_ENDARG)
- c = tLBRACE;
- }
+ if (IS_ARG() || lex_state == EXPR_END)
+ c = '{'; /* block (primary) */
+ else if (lex_state == EXPR_ENDARG)
+ c = tLBRACE_ARG; /* block (expr) */
+ else
+ c = tLBRACE; /* hash */
COND_PUSH(0);
CMDARG_PUSH(0);
lex_state = EXPR_BEG;