[#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:11758] [PATCH & Q] literal in condition

From: "Nobuyoshi.Nakada" <nobu.nakada@...>
Date: 2000-12-15 06:11:05 UTC
List: ruby-dev #11758
なかだです。

  ちょっと NODE 関連を調べてたんですが、条件式での文字列リテラルが正規表
現と見なされないようです。

  それと if /RE/ でだけ $_ が String でなくても例外にならないんですが、
これってそういうもん?

  ついでに、条件式が数値リテラルだったときに .. みたいに $. と比較するっ
てのはどうかなとか思ったんですが。


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 15:01:08 2000
@@ -4413,6 +4416,9 @@ cond0(node)
 
     assign_in_cond(node);
     switch (type) {
+      case NODE_DSTR:
+	nd_set_type(node, NODE_DREGX);
+	/* fall through */
       case NODE_DREGX:
       case NODE_DREGX_ONCE:
 	local_cnt('_');
@@ -4428,16 +4434,17 @@ cond0(node)
 	node->nd_cnt = local_append(0);
 	return node;
 
+      case NODE_STR:
+	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);
-	}
-	if (TYPE(node->nd_lit) == T_STRING) {
-	    local_cnt('_');
-	    local_cnt('~');
-	    return NEW_MATCH(rb_reg_new(RSTRING(node)->ptr,RSTRING(node)->len,0));
+	    return node;
 	}
       default:
 	return node;
@@ -4464,7 +4471,10 @@ cond2(node)
 
     node = cond(node);
     type = nd_type(node);
-    if (type == NODE_NEWLINE) node = node->nd_next;
+    if (type == NODE_NEWLINE) {
+	node = node->nd_next;
+	type = nd_type(node);
+    }
     if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
 	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
     }
diff -pruPX ./.excludes current/re.c devel/re.c
--- current/re.c	Mon Nov 20 16:31:45 2000
+++ devel/re.c	Fri Dec 15 11:28:26 2000
@@ -941,17 +941,7 @@ VALUE
 rb_reg_match2(re)
     VALUE re;
 {
-    int start;
-    VALUE line = rb_lastline_get();
-
-    if (TYPE(line) != T_STRING)
-	return Qnil;
-
-    start = rb_reg_search(re, line, 0, 0);
-    if (start < 0) {
-	return Qnil;
-    }
-    return INT2FIX(start);
+    return rb_reg_match(re, rb_lastline_get());
 }
 
 static VALUE


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

In This Thread

Prev Next