[#28681] ブロックパラメータと多値について — Takaaki Tateishi <ttate@...>

11 messages 2006/06/02

[#28708] 1.8.5 release schedule? — URABE Shyouhei <root@...>

というわけで今日の基調講演で8月に1.8.5が出ることになったわけですが。

105 messages 2006/06/10
[#28709] Re: 1.8.5 release schedule? — Yukihiro Matsumoto <matz@...> 2006/06/10

まつもと ゆきひろです

[#28711] Re: 1.8.5 release schedule? — URABE Shyouhei <root@...> 2006/06/11

卜部です。

[#29120] Re: 1.8.5 release schedule? — "U.Nakamura" <usa@...> 2006/07/24

こんにちは、なかむら(う)です。

[#29121] Re: 1.8.5 release schedule? — Yukihiro Matsumoto <matz@...> 2006/07/24

まつもと ゆきひろです

[#29128] bugs in ruby_1_8 (Re: 1.8.5 release schedule?) — URABE Shyouhei <root@...> 2006/07/25

卜部です。

[#29133] Re: bugs in ruby_1_8 (Re: 1.8.5 release schedule?) — Yukihiro Matsumoto <matz@...> 2006/07/26

まつもと ゆきひろです

[#29144] Re: bugs in ruby_1_8 (Re: 1.8.5 release schedule?) — URABE Shyouhei <root@...> 2006/07/26

卜部です。

[#29146] Re: bugs in ruby_1_8 (Re: 1.8.5 release schedule?) — Yukihiro Matsumoto <matz@...> 2006/07/26

まつもと ゆきひろです

[#29185] 1.8.5 preview3? — URABE Shyouhei <root@...> 2006/08/04

卜部です。

[#29186] Re: 1.8.5 preview3? — Yukihiro Matsumoto <matz@...> 2006/08/04

まつもと ゆきひろです

[#29225] Re: 1.8.5 preview3? — URABE Shyouhei <root@...> 2006/08/08

卜部です。

[#29226] Re: 1.8.5 preview3? — Yukihiro Matsumoto <matz@...> 2006/08/08

まつもと ゆきひろです

[#29228] Re: 1.8.5 preview3? — Yukihiro Matsumoto <matz@...> 2006/08/08

まつもと ゆきひろです

[#29231] Re: 1.8.5 preview3? — URABE Shyouhei <root@...> 2006/08/08

卜部です。

[#28751] Re: 1.8.5 release schedule? — URABE Shyouhei <root@...> 2006/06/19

卜部です。

[#28752] Re: 1.8.5 release schedule? — Yukihiro Matsumoto <matz@...> 2006/06/19

まつもと ゆきひろです

[#28753] Re: 1.8.5 release schedule? — URABE Shyouhei <root@...> 2006/06/19

卜部です。

[#28754] Re: 1.8.5 release schedule? — Yukihiro Matsumoto <matz@...> 2006/06/19

まつもと ゆきひろです

[#28813] Re: 1.8.5 release schedule? — URABE Shyouhei <root@...> 2006/06/23

卜部です。

[#28818] ruby 1.8.5 preview1 (Re: Re: 1.8.5 release schedule?) — Yukihiro Matsumoto <matz@...> 2006/06/24

まつもと ゆきひろです

[#28819] Re: ruby 1.8.5 preview1 (Re: Re: 1.8.5 release schedule?) — URABE Shyouhei <root@...> 2006/06/24

卜部です。

[#28820] Re: ruby 1.8.5 preview1 (Re: Re: 1.8.5 release schedule?) — Kouhei Yanagita <yanagi@...> 2006/06/24

柳田です。

[#28821] udp test with ruby 1.8.5 preview1 on cygwin — Tanaka Akira <akr@...17n.org> 2006/06/24

In article <y7vnup05.wl%yanagi@shakenbu.org>,

[#28823] Re: udp test with ruby 1.8.5 preview1 on cygwin — Kouhei Yanagita <yanagi@...> 2006/06/24

> いちおう問題の切り分けをするために確認したいんですが、その環

[#28824] Re: udp test with ruby 1.8.5 preview1 on cygwin — Tanaka Akira <akr@...17n.org> 2006/06/24

In article <veqrun77.wl%yanagi@shakenbu.org>,

[#28825] Re: udp test with ruby 1.8.5 preview1 on cygwin — Kouhei Yanagita <yanagi@...> 2006/06/24

mswin32 版ではどうなるのだろうと思って

[#28833] Re: udp test with ruby 1.8.5 preview1 on cygwin — info@... 2006/06/24

Cygwin @ WindowsXP SP2 です。

[#28834] Re: udp test with ruby 1.8.5 preview1 on cygwin — Tanaka Akira <akr@...17n.org> 2006/06/24

In article <449D66EC.8050405@cyanet.jp>,

[#28718] binding の仕様変更? or バグ? — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

15 messages 2006/06/12

[#28744] rational 1.08 — Tadayoshi Funaba <tadf@...>

ふなばです。

27 messages 2006/06/18
[#28773] Re: rational 1.08 — Shin-ichiro HARA <sinara@...> 2006/06/20

原です。

[#28830] Re: rational 1.08 — Tadayoshi Funaba <tadf@...> 2006/06/24

ふなばです。

[ruby-dev:28844] Re: when *a

From: nobu@...
Date: 2006-06-25 09:42:58 UTC
List: ruby-dev #28844
なかだです。

At Sat, 24 Jun 2006 23:53:27 +0900,
Yukihiro Matsumoto wrote in [ruby-dev:28829]:
> |At Sat, 24 Jun 2006 14:14:15 +0900,
> |Minero Aoki wrote in [ruby-dev:28822]:
> |> 次のように、when *a が動作しなくなっています。
> |
> |こんなとこでしょうか。
> 
> コミットしてください。

これだと when /b/, *[/a/] のような場合に動作してませんでした。
現状ではargsをそのまま使うようになっていますが、「ひとつひとつ
評価してはマッチさせる」という動作には不向きです。when_argsを復
活させたほうがいいような気がします。


Index: eval.c
===================================================================
RCS file: /cvs/ruby/src/ruby/eval.c,v
retrieving revision 1.903
diff -p -U2 -r1.903 eval.c
--- eval.c	23 Jun 2006 08:28:04 -0000	1.903
+++ eval.c	25 Jun 2006 08:01:46 -0000
@@ -2855,5 +2868,5 @@ rb_eval(VALUE self, NODE *n)
 				    ruby_frame->this_func,
 				    ruby_frame->this_class);
-		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
+		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_SPLAT) {
 			VALUE v = rb_eval(self, tag->nd_head->nd_head);
 			long i;
Index: parse.y
===================================================================
RCS file: /cvs/ruby/src/ruby/parse.y,v
retrieving revision 1.443
diff -p -U2 -r1.443 parse.y
--- parse.y	21 Jun 2006 08:08:34 -0000	1.443
+++ parse.y	25 Jun 2006 07:56:00 -0000
@@ -533,5 +536,5 @@ static void ripper_compile_error(struct 
 %type <node> expr_value arg_value primary_value
 %type <node> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
-%type <node> args call_args call_args2 opt_call_args
+%type <node> args when_args call_args call_args2 opt_call_args
 %type <node> open_args paren_args opt_paren_args
 %type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
@@ -3377,5 +3385,5 @@ brace_block	: '{'
 		;
 
-case_body	: kWHEN args then
+case_body	: kWHEN when_args then
 		  compstmt
 		  cases
@@ -3389,4 +3397,38 @@ case_body	: kWHEN args then
 		;
 
+when_args	: arg_value
+		    {
+		    /*%%%*/
+			$$ = NEW_LIST($1);
+		    /*%
+			$$ = arg_add(arg_new(), $1);
+		    %*/
+		    }
+		| tSTAR arg_value
+		    {
+		    /*%%%*/
+			$$ = NEW_LIST(NEW_SPLAT($2));
+		    /*%
+			$$ = arg_add_star(arg_new(), $2);
+		    %*/
+		    }
+		| when_args ',' arg_value
+		    {
+		    /*%%%*/
+			$$ = list_append($1, $3);
+		    /*%
+			$$ = arg_add($1, $3);
+		    %*/
+		    }
+		| when_args ',' tSTAR arg_value
+		    {
+		    /*%%%*/
+			$$ = list_append($1, NEW_SPLAT($4));
+		    /*%
+			$$ = arg_add_star($1, $4);
+		    %*/
+		    }
+		;
+
 cases		: opt_else
 		| case_body


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

In This Thread