[#11680] fork_and_kill_other_threads — "NAKAMURA, Hiroshi" <nakahiro@...>

なひです。[ruby-list:26165]からもって来ました。

27 messages 2000/12/02
[#11681] Re: fork_and_kill_other_threads — Masatoshi SEKI <m_seki@...> 2000/12/02

[#11682] Re: fork_and_kill_other_threads — matz@... (Yukihiro Matsumoto) 2000/12/02

まつもと ゆきひろです

[#11685] Re: fork_and_kill_other_threads — nobu.nakada@... 2000/12/03

なかだです。

[#11687] Re: fork_and_kill_other_threads — matz@... (Yukihiro Matsumoto) 2000/12/03

まつもと ゆきひろです

[#11708] Re: fork_and_kill_other_threads — Kazuhiro NISHIYAMA <zn@...> 2000/12/06

On Sun, 3 Dec 2000 23:33:41 +0900

[#11709] Re: fork_and_kill_other_threads — matz@... (Yukihiro Matsumoto) 2000/12/06

まつもと ゆきひろです

[#11710] Re: fork_and_kill_other_threads — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/12/06

なひです。

[#11713] Re: fork_and_kill_other_threads — matz@... (Yukihiro Matsumoto) 2000/12/06

まつもと ゆきひろです

[#11716] Re: fork_and_kill_other_threads — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/12/06

なひです。

[#11718] Re: fork_and_kill_other_threads — matz@... (Yukihiro Matsumoto) 2000/12/06

まつもと ゆきひろです

[#11722] Re: fork_and_kill_other_threads — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/12/07

なひです。

[#11733] Ruby I18N 改め M17N — とみたまさひろ <tommy@...>

とみたです。

17 messages 2000/12/07
[#11735] Re: Ruby I18N 改め M17N — matz@... (Yukihiro Matsumoto) 2000/12/08

まつもと ゆきひろです

[#11751] Re: Ruby I18N 改め M17N — とみたまさひろ <tommy@...> 2000/12/13

とみたです。

[#11752] Re: Ruby I18N 改め M17N — matz@... (Yukihiro Matsumoto) 2000/12/13

まつもと ゆきひろです

[#11789] mswin32 [Q & patch] mkmf.rb — "U.Nakamura" <usa@...>

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

14 messages 2000/12/18
[#11790] Re: mswin32 [Q & patch] mkmf.rb — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/12/19

なかだです。

[#11848] Where'd all the Ruby's history gone? — "Akinori MUSHA" <knu@...>

 さっき気付いたんですが、 Ruby のレポジトリから過去分がごっそり

27 messages 2000/12/25
[#11853] Re: Where'd all the Ruby's history gone? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[#11861] Re: Where'd all the Ruby's history gone? — Kazuhiro NISHIYAMA <zn@...> 2000/12/26

On Tue, 26 Dec 2000 14:58:07 +0900

[#11862] Re: Where'd all the Ruby's history gone? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[#11869] Re: Where'd all the Ruby's history gone? — "Akinori MUSHA" <knu@...> 2000/12/26

At Tue, 26 Dec 2000 17:44:57 +0900,

[#11894] Re: Where'd all the Ruby's history gone? — Kazuhiro NISHIYAMA <zn@...> 2000/12/29

On Tue, 26 Dec 2000 21:24:19 +0900

[#11895] Re: Where'd all the Ruby's history gone? — "Akinori MUSHA" <knu@...> 2000/12/29

At Fri, 29 Dec 2000 18:56:03 +0900,

[#11896] Re: Where'd all the Ruby's history gone? — Kazuhiro NISHIYAMA <zn@...> 2000/12/29

On Fri, 29 Dec 2000 19:07:12 +0900

[#11852] local variable extent problem? — Tanaka Akira <akr@...17n.org>

どうも、Ruby のバグのような気がするものを見つけたのですが、もしかした

21 messages 2000/12/26
[#11855] Re: local variable extent problem? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[#11857] Re: local variable extent problem? — Tanaka Akira <akr@...17n.org> 2000/12/26

In article <977817486.100168.31162.nullmailer@ev.netlab.zetabits.com>,

[#11859] Re: local variable extent problem? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[#11860] Re: local variable extent problem? — Tanaka Akira <akr@...17n.org> 2000/12/26

In article <977819010.870991.31953.nullmailer@ev.netlab.zetabits.com>,

[#11863] Re: local variable extent problem? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[#11865] Re: local variable extent problem? — "Akinori MUSHA" <knu@...> 2000/12/26

At Tue, 26 Dec 2000 17:50:11 +0900,

[#11874] Re: local variable extent problem? — matz@... (Yukihiro Matsumoto) 2000/12/26

まつもと ゆきひろです

[ruby-dev:11769] Re: [PATCH & Q] literal in condition

From: nobu.nakada@...
Date: 2000-12-16 12:04:46 UTC
List: ruby-dev #11769
なかだです。

At Fri, 15 Dec 2000 15:11:05 +0900,
Nobuyoshi-Nakada wrote:
>   ちょっと NODE 関連を調べてたんですが、条件式での文字列リテラルが正規表
> 現と見なされないようです。

  すいません、見なされすぎで nil || "" なんてのまで // =~ $_ と
同じになってました。とりあえずこんな感じに訂正。


diff -pruPX ./.excludes current/eval.c devel/eval.c
--- current/eval.c	Tue Dec 12 16:42:21 2000
+++ devel/eval.c	Fri Dec 15 14:45:41 2000
@@ -1982,7 +1982,7 @@ rb_eval(self, n)
 
 	/* nodes for speed-up(default match) */
       case NODE_MATCH:
-	result = rb_reg_match2(node->nd_head->nd_lit);
+	result = rb_reg_match2(node->nd_lit);
 	break;
 
 	/* nodes for speed-up(literal match) */
diff -pruPX ./.excludes current/parse.y devel/parse.y
--- current/parse.y	Tue Dec 12 16:42:28 2000
+++ devel/parse.y	Fri Dec 15 17:05:49 2000
@@ -4406,13 +4408,18 @@ assign_in_cond(node)
 }
 
 static NODE*
-cond0(node)
+cond0(node, log)
     NODE *node;
+    int log;
 {
     enum node_type type = nd_type(node);
 
     assign_in_cond(node);
     switch (type) {
+      case NODE_DSTR:
+	if (log) break;
+	nd_set_type(node, NODE_DREGX);
+	/* fall through */
       case NODE_DREGX:
       case NODE_DREGX_ONCE:
 	local_cnt('_');
@@ -4421,54 +4428,48 @@ cond0(node)
 
       case NODE_DOT2:
       case NODE_DOT3:
-	node->nd_beg = cond2(node->nd_beg);
-	node->nd_end = cond2(node->nd_end);
+	node->nd_beg = cond0(node->nd_beg, log);
+	node->nd_end = cond0(node->nd_end, log);
 	if (type == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
 	else if (type == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
 	node->nd_cnt = local_append(0);
 	return node;
 
+      case NODE_STR:
+	if (log) break;
+	node->nd_lit = rb_reg_new(RSTRING(node->nd_lit)->ptr,RSTRING(node->nd_lit)->len,0);
+	goto regexp;
+
       case NODE_LIT:
 	if (TYPE(node->nd_lit) == T_REGEXP) {
+	  regexp:
+	    nd_set_type(node, NODE_MATCH);
 	    local_cnt('_');
 	    local_cnt('~');
-	    return NEW_MATCH(node);
+	    return node;
 	}
-	if (TYPE(node->nd_lit) == T_STRING) {
-	    local_cnt('_');
-	    local_cnt('~');
-	    return NEW_MATCH(rb_reg_new(RSTRING(node)->ptr,RSTRING(node)->len,0));
-	}
-      default:
-	return node;
     }
+    return node;
 }
 
 static NODE*
-cond(node)
+cond1(node, log)
     NODE *node;
+    int log;
 {
     if (node == 0) return 0;
     if (nd_type(node) == NODE_NEWLINE){
-	node->nd_next = cond0(node->nd_next);
+	node->nd_next = cond0(node->nd_next, log);
 	return node;
     }
-    return cond0(node);
+    return cond0(node, log);
 }
 
 static NODE*
-cond2(node)
+cond(node)
     NODE *node;
 {
-    enum node_type type;
-
-    node = cond(node);
-    type = nd_type(node);
-    if (type == NODE_NEWLINE) node = node->nd_next;
-    if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
-	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
-    }
-    return node;
+    return cond1(node, 0);
 }
 
 static NODE*
@@ -4477,7 +4478,7 @@ logop(type, left, right)
     NODE *left, *right;
 {
     value_expr(left);
-    return rb_node_newnode(type, cond(left), cond(right), 0);
+    return rb_node_newnode(type, cond1(left, 1), cond1(right, 1), 0);
 }
 
 static NODE *


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

In This Thread