summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-08 23:54:13 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-08 23:54:13 +0000
commitd7bacd080ddbd891e99f32ac6b812a805c96ff01 (patch)
tree592aa005cb2426ba3d81e7f41d899d3e20f1825e
parentb59563958b65a0c21f340432821301783fc94475 (diff)
merge revision(s) 21688:
* parse.y (IS_BEG): EXPR_CLASS should be treated like EXPR_BEG. [ruby-core:21453] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@22828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y21
-rw-r--r--version.h11
3 files changed, 22 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index d7315f0828..16573c693f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 9 08:52:37 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (IS_BEG): EXPR_CLASS should be treated like EXPR_BEG.
+ [ruby-core:21453]
+
Wed Feb 25 15:14:32 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* node.h (rb_thread_raised_clear): should not clear flags other than
diff --git a/parse.y b/parse.y
index 5556d725fb..1d7cf8753e 100644
--- a/parse.y
+++ b/parse.y
@@ -3368,6 +3368,7 @@ arg_ambiguous()
}
#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
+#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_CLASS)
static int
yylex()
@@ -3453,7 +3454,7 @@ yylex()
rb_warning("`*' interpreted as argument prefix");
c = tSTAR;
}
- else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ else if (IS_BEG()) {
c = tSTAR;
}
else {
@@ -3682,7 +3683,7 @@ yylex()
rb_warning("`&' interpreted as argument prefix");
c = tAMPER;
}
- else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ else if (IS_BEG()) {
c = tAMPER;
}
else {
@@ -3736,7 +3737,7 @@ yylex()
lex_state = EXPR_BEG;
return tOP_ASGN;
}
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
+ if (IS_BEG() ||
(IS_ARG() && space_seen && !ISSPACE(c))) {
if (IS_ARG()) arg_ambiguous();
lex_state = EXPR_BEG;
@@ -3766,7 +3767,7 @@ yylex()
lex_state = EXPR_BEG;
return tOP_ASGN;
}
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
+ if (IS_BEG() ||
(IS_ARG() && space_seen && !ISSPACE(c))) {
if (IS_ARG()) arg_ambiguous();
lex_state = EXPR_BEG;
@@ -4027,8 +4028,7 @@ yylex()
case ':':
c = nextc();
if (c == ':') {
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
- lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
+ if (IS_BEG() || (IS_ARG() && space_seen)) {
lex_state = EXPR_BEG;
return tCOLON3;
}
@@ -4055,7 +4055,7 @@ yylex()
return tSYMBEG;
case '/':
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ if (IS_BEG()) {
lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
return tREGEXP_BEG;
}
@@ -4117,7 +4117,7 @@ yylex()
case '(':
command_start = Qtrue;
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ if (IS_BEG()) {
c = tLPAREN;
}
else if (space_seen) {
@@ -4147,7 +4147,7 @@ yylex()
pushback(c);
return '[';
}
- else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ else if (IS_BEG()) {
c = tLBRACK;
}
else if (IS_ARG() && space_seen) {
@@ -4180,7 +4180,7 @@ yylex()
return '\\';
case '%':
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ if (IS_BEG()) {
int term;
int paren;
@@ -4493,6 +4493,7 @@ yylex()
lex_state == EXPR_MID ||
lex_state == EXPR_DOT ||
lex_state == EXPR_ARG ||
+ lex_state == EXPR_CLASS ||
lex_state == EXPR_CMDARG) {
if (cmd_state) {
lex_state = EXPR_CMDARG;
diff --git a/version.h b/version.h
index bcb871dc5a..776057e7f8 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2009-02-25"
+#define RUBY_RELEASE_DATE "2009-03-09"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20090225
-#define RUBY_PATCHLEVEL 355
+#define RUBY_RELEASE_CODE 20090309
+#define RUBY_PATCHLEVEL 356
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2009
-#define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 25
+#define RUBY_RELEASE_MONTH 3
+#define RUBY_RELEASE_DAY 9
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
@@ -21,3 +21,4 @@ RUBY_EXTERN const int ruby_patchlevel;
+