[#24536] 「Rubyの落し方」 v.s. ruby_1_8 — akira yamada / やまだあきら <akira@...>

<URL:http://jp.rubyist.net/magazine/?0002-RubyCore>

40 messages 2004/10/20
[#24541] Re: 「Rubyの落し方」 v.s. ruby_1_8 — Yukihiro Matsumoto <matz@...> 2004/10/20

まつもと ゆきひろです

[#24599] 1.8.2 preview3? — akira yamada / やまだあきら <akira@...> 2004/10/26

2004-10-20 (水) の 21:38 +0900 に Yukihiro Matsumoto さんは書きました:

[#24605] Re: 1.8.2 preview3? — akira yamada / やまだあきら <akira@...> 2004/10/27

2004-10-26 (火) の 16:16 +0900 に akira yamada / やまだあきら さんは書きました:

[#24606] Re: 1.8.2 preview3? — Yukihiro Matsumoto <matz@...> 2004/10/27

まつもと ゆきひろです

[#24608] Re: 1.8.2 preview3? — akira yamada / やまだあきら <akira@...> 2004/10/27

2004-10-27 (水) の 11:48 +0900 に Yukihiro Matsumoto さんは書きました:

[#24620] Re: 1.8.2 preview3? — akira yamada / やまだあきら <akira@...> 2004/10/27

2004-10-27 (水) の 12:42 +0900 に akira yamada / やまだあきら さんは書きました:

[#24629] Re: 1.8.2 preview3? — Tanaka Akira <akr@...17n.org> 2004/10/29

In article <1098888819.9446.14.camel@rice.p.arika.org>,

[ruby-dev:24390] removing NODE_BEGIN

From: nobu@...
Date: 2004-10-02 08:21:30 UTC
List: ruby-dev #24390
なかだです。

不要なNODE_BEGINが残ることがあります。

$ ruby -rNodeDump -e 'begin ensure 0 end; 1'
NodeDump V0.9

NODE_BLOCK:
  NODE_BEGIN:
    NODE_NIL:
  NODE_LIT:  Fixnum: 1


Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.347
diff -U2 -p -d -r1.347 parse.y
--- parse.y	27 Sep 2004 06:02:27 -0000	1.347
+++ parse.y	2 Oct 2004 07:48:59 -0000
@@ -652,5 +652,5 @@
 		    {
 		    /*%%%*/
-			$$ = newline_node($1);
+			$$ = newline_node(remove_begin($1));
 		    /*%
 			$$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
@@ -660,5 +660,5 @@
 		    {
 		    /*%%%*/
-			$$ = block_append($1, newline_node($3));
+			$$ = block_append($1, newline_node(remove_begin($3)));
 		    /*%
 			$$ = dispatch2(stmts_add, $1, $3);
@@ -667,5 +667,5 @@
 		| error stmt
 		    {
-			$$ = $2;
+			$$ = remove_begin($2);
 		    }
 		;
@@ -3320,9 +3320,5 @@
 		    {
 		    /*%%%*/
-			if ($2)
-			    $$ = $2;
-			else
-			    /* place holder */
-			    $$ = NEW_NIL();
+			$$ = $2;
 		    /*%
 			$$ = dispatch1(ensure, $2);


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread

Prev Next