[#39464] Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

25 messages 2004/04/01
[#39608] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

遅い反応&File.fnmatchは使った事ない&ruby-devの方では

[#39609] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

File.fnmatch(と Dir.glob)をちょっと使ってみたのですが、

[#39610] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/05/02

山本です。

[#39611] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/02

まつもと ゆきひろです

[#39613] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[#39616] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/02

まつもと ゆきひろです

[#39620] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/03

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[#39621] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/03

まつもと ゆきひろです

[#39622] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/03

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[ruby-list:39551] Re: NEW trial (RC?) version of Ruby/Tk

From: Hidetoshi NAGAI <nagai@...>
Date: 2004-04-14 15:19:27 UTC
List: ruby-list #39551
永井@知能.九工大です.

From: Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
Subject: [ruby-list:39550] NEW trial (RC?) version of Ruby/Tk
Date: Wed, 14 Apr 2004 21:51:13 +0900
Message-ID: <20040414.215111.71113959.nagai@ai.kyutech.ac.jp>
> 前回と同様に,アーカイブを
> 
>   http://www.dumbo.ai.kyutech.ac.jp/~nagai/rbtk20040414.tar.gz
> 
> に置いていますので,できましたら入手して試してみてください.

ごめんなさい.これ,Tcl/Tk8.0 と組み合わせると
コンパイルできませんでした.
Tcl/Tk8.0 を使われる方は添付のパッチをあててください.

# 新機能対応のため Tcl/Tk8.4.6 と 8.5a1 とでばかりテストしてて,
# Tcl/Tk8.0 でのチェックを忘れてました.

また,ちょうど手元に Tcl7.6/Tk4.2 がなかったのでテストしてないのですが,
どなたかテストできる方はいらっしゃいますか?

なお言い忘れてましたが,[ruby-list:39496] で要望として出ていた
pthread 整合性のチェックも extconf.rb に加えてみています.
-- 
                                         永井 秀利 (九工大 知能情報)
                                             nagai@ai.kyutech.ac.jp

Attachments (1)

diff20040415 (4.84 KB, text/x-diff)
diff -ur ../20040414/tcltklib/extconf.rb ./tcltklib/extconf.rb
--- ../20040414/tcltklib/extconf.rb	2004-04-14 21:13:53.000000000 +0900
+++ ./tcltklib/extconf.rb	2004-04-15 00:04:36.000000000 +0900
@@ -102,7 +102,7 @@
 **
 **   Ruby is compiled with --enable-pthread, but your Tcl/Tk libraries
 **   seems to be compiled without "pthread support". Although You can 
-**   create tcltklib library, this combination may causes memory trouble 
+**   create tcltklib library, this combination may cause memory trouble 
 **   (e.g. "Hang-up" or "Segmentation Fault"). We recommend you to make 
 **   both or neither support pthread.
 **
diff -ur ../20040414/tcltklib/tcltklib.c ./tcltklib/tcltklib.c
--- ../20040414/tcltklib/tcltklib.c	2004-04-14 21:13:53.000000000 +0900
+++ ./tcltklib/tcltklib.c	2004-04-15 00:03:17.000000000 +0900
@@ -1184,6 +1184,9 @@
 		/* StringValue(res); */
 		res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+		Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 		/* to avoid a garbled error message dialog */
 		buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 		strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1198,7 +1201,7 @@
 		DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 		free(buf);
-
+#endif
 		rb_thread_critical = thr_crit_bup;
 
 		return TCL_ERROR;
@@ -1223,6 +1226,9 @@
 		/* StringValue(res); */
 		res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+		Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 		/* to avoid a garbled error message dialog */
 		buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 		strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1237,7 +1243,7 @@
 		DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 		free(buf);
-
+#endif
 		rb_thread_critical = thr_crit_bup;
 
 		return TCL_ERROR;
@@ -1252,6 +1258,9 @@
 	    /* StringValue(res); */
 	    res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+	    Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 	    /* to avoid a garbled error message dialog */
 	    buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 	    strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1266,7 +1275,7 @@
 	    DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 	    free(buf);
-
+#endif
 	    rb_thread_critical = thr_crit_bup;
 
 	    return TCL_ERROR;
@@ -1625,6 +1634,9 @@
 		/* StringValue(res); */
 		res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+		Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 		/* to avoid a garbled error message dialog */
 		buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 		strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1639,7 +1651,7 @@
 		DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 		free(buf);
-
+#endif
 		rb_thread_critical = thr_crit_bup;
 
 		return TCL_ERROR;
@@ -1664,6 +1676,9 @@
 		/* StringValue(res); */
 		res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+		Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 		/* to avoid a garbled error message dialog */
 		buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 		strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1678,7 +1693,7 @@
 		DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 		free(buf);
-
+#endif
 		rb_thread_critical = thr_crit_bup;
 
 		return TCL_ERROR;
@@ -1693,6 +1708,9 @@
 	    /* StringValue(res); */
 	    res = rb_funcall(res, ID_message, 0, 0);
 
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+	    Tcl_AppendResult(interp, RSTRING(res)->ptr, (char*)NULL);
+#else
 	    /* to avoid a garbled error message dialog */
 	    buf = ALLOC_N(char,(RSTRING(res)->len)+1);
 	    strncpy(buf, RSTRING(res)->ptr, RSTRING(res)->len);
@@ -1707,7 +1725,7 @@
 	    DUMP2("error message:%s", Tcl_DStringValue(&dstr));
 
 	    free(buf);
-
+#endif
 	    rb_thread_critical = thr_crit_bup;
 
 	    return TCL_ERROR;
@@ -3495,8 +3513,9 @@
     VALUE src;
     VALUE encodename;
 {
-#ifdef TCL_UTF_MAX
     volatile VALUE str = src;
+
+#ifdef TCL_UTF_MAX
     Tcl_Interp *interp;
     Tcl_Encoding encoding;
     Tcl_DString dstr;
@@ -3622,8 +3641,9 @@
     VALUE src;
     VALUE encodename;
 {
-#ifdef TCL_UTF_MAX
     volatile VALUE str = src;
+
+#ifdef TCL_UTF_MAX
     Tcl_Interp *interp;
     Tcl_Encoding encoding;
     Tcl_DString dstr;
diff -ur ../20040414/tk/tkutil.c ./tk/tkutil.c
--- ../20040414/tk/tkutil.c	2004-04-14 21:13:53.000000000 +0900
+++ ./tk/tkutil.c	2004-04-15 00:03:32.000000000 +0900
@@ -1067,7 +1067,13 @@
 tkobj_path(self)
     VALUE self;
 {
-    return rb_ivar_get(self, ID_path);
+    volatile VALUE val = rb_ivar_get(self, ID_path);
+
+    if (NIL_P(val)) {
+	return rb_str_new2("");
+    } else {
+	return val;
+    }
 }
 
 /*************************************/

In This Thread