summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-29 07:59:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-29 07:59:12 +0000
commita57d0b0926870d9cfb85e6bd325e084963661de1 (patch)
tree394c91d2e3133d39dd4cac8b03bb98bdc4d79ec2
parent54e0b26ecf1ded39a6c2496062106e80430e488d (diff)
* parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--parse.y15
-rw-r--r--version.h6
3 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index d95fdc1..e3b6e28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Nov 29 16:59:10 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
+
Wed Nov 28 14:43:14 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to
diff --git a/parse.y b/parse.y
index 4aa8035..9b8cf15 100644
--- a/parse.y
+++ b/parse.y
@@ -398,15 +398,15 @@ compstmt : stmts opt_terms
stmts : none
| stmt
{
- $$ = newline_node($1);
+ $$ = newline_node(remove_begin($1));
}
| stmts terms stmt
{
- $$ = block_append($1, newline_node($3));
+ $$ = block_append($1, newline_node(remove_begin($3)));
}
| error stmt
{
- $$ = $2;
+ $$ = remove_begin($2);
}
;
@@ -436,7 +436,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
}
| stmt kIF_MOD expr_value
{
- $$ = NEW_IF(cond($3), $1, 0);
+ $$ = NEW_IF(cond($3), remove_begin($1), 0);
fixpos($$, $3);
if (cond_negative(&$$->nd_cond)) {
$$->nd_else = $$->nd_body;
@@ -445,7 +445,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
}
| stmt kUNLESS_MOD expr_value
{
- $$ = NEW_UNLESS(cond($3), $1, 0);
+ $$ = NEW_UNLESS(cond($3), remove_begin($1), 0);
fixpos($$, $3);
if (cond_negative(&$$->nd_cond)) {
$$->nd_body = $$->nd_else;
@@ -478,7 +478,8 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
}
| stmt kRESCUE_MOD stmt
{
- $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
+ NODE *resq = NEW_RESBODY(0, remove_begin($3), 0);
+ $$ = NEW_RESCUE(remove_begin($1), resq, 0);
}
| klBEGIN
{
@@ -5206,7 +5207,7 @@ void_stmts(node)
for (;;) {
if (!node->nd_next) return;
- void_expr(node->nd_head);
+ void_expr0(node->nd_head);
node = node->nd_next;
}
}
diff --git a/version.h b/version.h
index f2b83e4..06483f5 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-11-28"
+#define RUBY_RELEASE_DATE "2007-11-29"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20071128
+#define RUBY_RELEASE_CODE 20071129
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 28
+#define RUBY_RELEASE_DAY 29
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];