[#27919] 1.8.4 Preview2 検証 — "URABE Shyouhei aka. mput" <root@...>

卜部です。

33 messages 2005/12/01

[#27997] 1.8.4 documents? — "URABE Shyouhei aka. mput" <root@...>

卜部です。

22 messages 2005/12/12
[#28017] Re: 1.8.4 documents? — Koji Arai <jca02266@...> 2005/12/13

新井です。

[#28082] ruby_1_8 Segmentation fault on Cygwin — yanagi@...

柳田です。

13 messages 2005/12/21
[#28083] Re: ruby_1_8 Segmentation fault on Cygwin — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/12/21

山本です。

[#28140] ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — Tanaka Akira <akr@...17n.org>

HP-UX で HP aC++/ANSI C を使って作った ruby で、openssl や drb のテストをすると、

34 messages 2005/12/27
[#28141] Re: ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — WATANABE Tetsuya <Tetsuya.WATANABE@...> 2005/12/28

渡辺哲也です。

[#28142] Re: ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — Tanaka Akira <akr@...17n.org> 2005/12/28

In article <200512280307.jBS37nnj005909@pbsg500.nifty.com>,

[#28147] Re: ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/12/28

山本です。

[#28149] Re: ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — Tanaka Akira <akr@...17n.org> 2005/12/28

In article <20051228210640.13C71A10.ocean@m2.ccsnet.ne.jp>,

[#28151] Re: ia64-hpux11.23/socket.sl: this executable file can't load extension libraries (LoadError) — WATANABE Tetsuya <Tetsuya.WATANABE@...> 2005/12/29

渡辺哲也です。

[#28152] Re: ia64-hpux11.23/socket.sl: this executable file can't load extensionlibraries (LoadError) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/12/29

山本です。

[#28153] Re: ia64-hpux11.23/socket.sl: this executable file can't load extensionlibraries (LoadError) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/12/29

山本です。

[#28154] thread based generator.rb — Tanaka Akira <akr@...17n.org> 2005/12/29

In article <20051229114438.44D19F00.ocean@m2.ccsnet.ne.jp>,

[ruby-dev:28123] Re: 1.8.4 documents?

From: nobuyoshi nakada <nobuyoshi.nakada@...>
Date: 2005-12-26 06:21:00 UTC
List: ruby-dev #28123
なかだです。

At Sat, 24 Dec 2005 01:55:19 +0900,
Koji Arai wrote in [ruby-dev:28105]:
> これなんですが、試してみると以下のように 1.8 ではエラーになりますね。
> 
>     def bar; p "bar"; end
>     alias :"foo" :"bar"
>     foo
> 
>     # => ruby 1.8.4 (2005-12-22) [i686-linux]
> 	 -:2: syntax error, unexpected tSTRING_CONTENT
> 	     alias :"foo" :"bar"
> 			^
> 	 -:2: warning: unused literal ignored
>     # => ruby 1.9.0 (2005-12-10) [i686-linux]
> 	 "bar"

ChangeLogには載ってませんが、2004-10-30 15:56:17の変更ですね。
バックポートしても問題なさそうに見えますが。


Index: eval.c
===================================================================
RCS file: /cvs/ruby/src/ruby/eval.c,v
retrieving revision 1.616.2.142
diff -U2 -p -r1.616.2.142 eval.c
--- eval.c	20 Dec 2005 13:41:47 -0000	1.616.2.142
+++ eval.c	26 Dec 2005 05:48:52 -0000
@@ -3887,5 +3887,5 @@ rb_eval(self, n)
 	    rb_raise(rb_eTypeError, "no class to undef method");
 	}
-	rb_undef(ruby_class, node->nd_mid);
+	rb_undef(ruby_class, rb_to_id(rb_eval(self, node->u2.node)));
 	result = Qnil;
 	break;
@@ -3895,10 +3895,11 @@ rb_eval(self, n)
 	    rb_raise(rb_eTypeError, "no class to make alias");
 	}
-	rb_alias(ruby_class, node->nd_new, node->nd_old);
+	rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)),
+		             rb_to_id(rb_eval(self, node->u2.node)));
 	result = Qnil;
 	break;
 
       case NODE_VALIAS:
-	rb_alias_variable(node->nd_new, node->nd_old);
+	rb_alias_variable(node->u1.id, node->u2.id);
 	result = Qnil;
 	break;
Index: gc.c
===================================================================
RCS file: /cvs/ruby/src/ruby/gc.c,v
retrieving revision 1.168.2.30
diff -U2 -p -r1.168.2.30 gc.c
--- gc.c	16 Dec 2005 04:58:51 -0000	1.168.2.30
+++ gc.c	26 Dec 2005 06:14:09 -0000
@@ -815,4 +815,6 @@ gc_mark_children(ptr, lev)
 	  case NODE_OP_ASGN_AND:
 	  case NODE_MODULE:
+	  case NODE_ALIAS:
+	  case NODE_VALIAS:
 	    gc_mark((VALUE)obj->as.node.u1.node, lev);
 	    /* fall through */
@@ -829,4 +831,5 @@ gc_mark_children(ptr, lev)
 	  case NODE_OPT_N:
 	  case NODE_EVSTR:
+	  case NODE_UNDEF:
 	    ptr = (VALUE)obj->as.node.u2.node;
 	    goto again;
@@ -868,9 +871,6 @@ gc_mark_children(ptr, lev)
 	  case NODE_NTH_REF:
 	  case NODE_BACK_REF:
-	  case NODE_ALIAS:
-	  case NODE_VALIAS:
 	  case NODE_REDO:
 	  case NODE_RETRY:
-	  case NODE_UNDEF:
 	  case NODE_SELF:
 	  case NODE_NIL:
Index: node.h
===================================================================
RCS file: /cvs/ruby/src/ruby/node.h,v
retrieving revision 1.50.2.4
diff -U2 -p -r1.50.2.4 node.h
--- node.h	8 Oct 2005 09:57:12 -0000	1.50.2.4
+++ node.h	26 Dec 2005 06:14:09 -0000
@@ -210,7 +210,4 @@ typedef struct RNode {
 #define nd_defn  u3.node
 
-#define nd_old   u1.id
-#define nd_new   u2.id
-
 #define nd_cfnc  u1.cfunc
 #define nd_argc  u2.argc
@@ -312,6 +309,6 @@ typedef struct RNode {
 #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
 #define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
-#define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,o,n,0)
-#define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,o,n,0)
+#define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
+#define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,n,o,0)
 #define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
 #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.307.2.25
diff -U2 -p -r1.307.2.25 parse.y
--- parse.y	19 Dec 2005 14:33:05 -0000	1.307.2.25
+++ parse.y	26 Dec 2005 05:46:30 -0000
@@ -278,7 +278,7 @@ static void top_local_setup();
 %type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg
 %type <node> assoc_list assocs assoc undef_list backref string_dvar
-%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none
+%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none fitem
 %type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
-%type <id>   fitem variable sym symbol operation operation2 operation3
+%type <id>   fsym variable sym symbol operation operation2 operation3
 %type <id>   cname fname op f_rest_arg
 %type <num>  f_norm_arg f_arg
@@ -917,8 +917,15 @@ fname		: tIDENTIFIER
 		;
 
-fitem		: fname
+fsym		: fname
 		| symbol
 		;
 
+fitem		: fsym
+		    {
+			$$ = NEW_LIT(ID2SYM($1));
+		    }
+		| dsym
+		;
+
 undef_list	: fitem
 		    {


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

In This Thread