summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-08 23:55:21 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-08 23:55:21 +0000
commit2d281863caef13ca12530822f682d174f833cee6 (patch)
treec0e5301202ffef407d3280f282d526438ce42fa4
parent732f179503065030a85ec5db47dadc5af5f2d234 (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_7@22830 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 71258113e3..1ae9ec64be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 9 08:54:47 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:15:52 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 101ac1900c..9f14466816 100644
--- a/parse.y
+++ b/parse.y
@@ -3434,6 +3434,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()
@@ -3519,7 +3520,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 {
@@ -3748,7 +3749,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 {
@@ -3802,7 +3803,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;
@@ -3832,7 +3833,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;
@@ -4093,8 +4094,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;
}
@@ -4121,7 +4121,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;
}
@@ -4183,7 +4183,7 @@ yylex()
case '(':
command_start = Qtrue;
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ if (IS_BEG()) {
c = tLPAREN;
}
else if (space_seen) {
@@ -4213,7 +4213,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) {
@@ -4247,7 +4247,7 @@ yylex()
return '\\';
case '%':
- if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
+ if (IS_BEG()) {
int term;
int paren;
@@ -4561,6 +4561,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 b0106b5f10..765c0f1f34 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2009-02-25"
+#define RUBY_RELEASE_DATE "2009-03-09"
#define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20090225
-#define RUBY_PATCHLEVEL 144
+#define RUBY_RELEASE_CODE 20090309
+#define RUBY_PATCHLEVEL 145
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 7
#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[];
@@ -32,3 +32,4 @@ RUBY_EXTERN const char *ruby_copyright;
+