ruby-changes:5459
From: shyouhei <ko1@a...>
Date: Sun, 8 Jun 2008 04:52:57 +0900 (JST)
Subject: [ruby-changes:5459] Ruby:r16962 (ruby_1_8_6): merge revision(s) 14045, 14059:
shyouhei 2008-06-08 04:51:53 +0900 (Sun, 08 Jun 2008)
New Revision: 16962
Modified files:
branches/ruby_1_8_6/ChangeLog
branches/ruby_1_8_6/parse.y
branches/ruby_1_8_6/version.h
Log:
merge revision(s) 14045, 14059:
* parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
* parse.y (newline_node): set line from outermost node before removing
NODE_BEGIN. [ruby-dev:32406]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=16962&r2=16961&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=16962&r2=16961&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/parse.y?r1=16962&r2=16961&diff_format=u
Index: ruby_1_8_6/parse.y
===================================================================
--- ruby_1_8_6/parse.y (revision 16961)
+++ ruby_1_8_6/parse.y (revision 16962)
@@ -406,7 +406,7 @@
}
| error stmt
{
- $$ = $2;
+ $$ = remove_begin($2);
}
;
@@ -436,7 +436,7 @@
}
| 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 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 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
{
@@ -4550,10 +4551,13 @@
{
NODE *nl = 0;
if (node) {
+ int line;
if (nd_type(node) == NODE_NEWLINE) return node;
- nl = NEW_NEWLINE(node);
- fixpos(nl, node);
- nl->nd_nth = nd_line(node);
+ line = nd_line(node);
+ node = remove_begin(node);
+ nl = NEW_NEWLINE(node);
+ nd_set_line(nl, line);
+ nl->nd_nth = line;
}
return nl;
}
@@ -5208,7 +5212,7 @@
for (;;) {
if (!node->nd_next) return;
- void_expr(node->nd_head);
+ void_expr0(node->nd_head);
node = node->nd_next;
}
}
Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog (revision 16961)
+++ ruby_1_8_6/ChangeLog (revision 16962)
@@ -1,3 +1,12 @@
+Sun Jun 8 04:49:43 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * parse.y (newline_node): set line from outermost node before removing
+ NODE_BEGIN. [ruby-dev:32406]
+
+Sun Jun 8 04:37:34 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
+
Sun Jun 8 04:16:35 2008 Nobuyoshi Nakada <nobu@r...>
* eval.c (rb_alias): do not call hook functions until initialization
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h (revision 16961)
+++ ruby_1_8_6/version.h (revision 16962)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-08"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080608
-#define RUBY_PATCHLEVEL 151
+#define RUBY_PATCHLEVEL 153
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/