[#17881] Re: [ruby-list:35696] Re: サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — nobu.nakada@...

なかだです。

14 messages 2002/08/02
[#17883] Re: [ruby-list:35696] Re: サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — nobu.nakada@... 2002/08/02

なかだです。

[#17906] Re: [ruby-list:35696] Re: サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — Takaaki Tateishi <ttate@...> 2002/08/03

At Fri, 2 Aug 2002 12:17:33 +0900,

[#17908] Re: [ruby-list:35696] Re: サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — matz@... (Yukihiro Matsumoto) 2002/08/03

まつもと ゆきひろです

[#17909] Re: [ruby-list:35696] Re: サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — Takaaki Tateishi <ttate@...> 2002/08/03

At Sat, 3 Aug 2002 23:32:39 +0900,

[#17887] next parser (Re: parenthesize argument(s) for future version) — Minero Aoki <aamine@...>

あおきです。スレッド切ります。

18 messages 2002/08/02
[#17895] Re: next parser (Re: parenthesize argument(s) for future version) — matz@... (Yukihiro Matsumoto) 2002/08/03

まつもと ゆきひろです

[#17898] Re: next parser (Re: parenthesize argument(s) for future version) — Minero Aoki <aamine@...> 2002/08/03

あおきです。

[#17904] Re: next parser (Re: parenthesize argument(s) for future version) — matz@... (Yukihiro Matsumoto) 2002/08/03

まつもと ゆきひろです

[#17920] Re: next parser (Re: parenthesize argument(s) for future version) — Minero Aoki <aamine@...> 2002/08/04

あおきです。

[#17933] Re: next parser (Re: parenthesize argument(s) for future version) — matz@... (Yukihiro Matsumoto) 2002/08/06

まつもと ゆきひろです

[#17889] ruby-bugs-ja incoming/277 — Takaaki Tateishi <ttate@...>

立石です.

15 messages 2002/08/02
[#17890] Re: ruby-bugs-ja incoming/277 — Takaaki Tateishi <ttate@...> 2002/08/02

At Sat, 3 Aug 2002 05:13:32 +0900,

[#17927] Re: import-module (Re: Re: scope-in-state) — keiju@... (石塚圭樹)

けいじゅ@日本ラショナルソフトウェアです.

13 messages 2002/08/05
[#17943] Re: import-module (Re: Re: scope-in-state) — Shin-ichiro HARA <sinara@...> 2002/08/06

原です。

[#17949] Re: import-module (Re: Re: scope-in-state) — keiju@... (石塚圭樹) 2002/08/06

けいじゅ@日本ラショナルソフトウェアです.

[#17955] Re: import-module (Re: Re: scope-in-state) — Shin-ichiro HARA <sinara@...> 2002/08/07

原です。

[#17954] Selection IPv4/IPv6 at TCPSocket — NISHI Takao <zophos@...9.com>

にし@おかやまです。

19 messages 2002/08/07
[#18120] Re: Selection IPv4/IPv6 at TCPSocket — "Akinori MUSHA" <knu@...> 2002/08/31

At Wed, 7 Aug 2002 13:23:37 +0900,

[#18121] Re: Selection IPv4/IPv6 at TCPSocket — GOTO Kentaro <gotoken@...> 2002/08/31

At Sun, 1 Sep 2002 03:31:01 +0900,

[#18127] Re: Selection IPv4/IPv6 at TCPSocket — "Akinori MUSHA" <knu@...> 2002/09/01

At Sun, 1 Sep 2002 04:00:33 +0900,

[#18128] Re: Selection IPv4/IPv6 at TCPSocket — "Akinori MUSHA" <knu@...> 2002/09/01

At Sun, 1 Sep 2002 12:37:05 +0900,

[#18130] Re: Selection IPv4/IPv6 at TCPSocket — GOTO Kentaro <gotoken@...> 2002/09/01

At Sun, 1 Sep 2002 13:00:46 +0900,

[#18131] Re: Selection IPv4/IPv6 at TCPSocket — Minero Aoki <aamine@...> 2002/09/01

あおきです。

[#17965] inferior-ruby-mode and irb — keiju@... (Keiju ISHITSUKA)

けいじゅ@日本ラショナルソフトウェアです.

22 messages 2002/08/09
[#17971] Re: inferior-ruby-mode and irb — matz@... (Yukihiro Matsumoto) 2002/08/10

まつもと ゆきひろです

[#18008] Re: inferior-ruby-mode and irb — keiju@... (石塚圭樹) 2002/08/14

けいじゅ@日本ラショナルソフトウェアです.

[#17966] Hash has default block? — Tanaka Akira <akr@...17n.org>

ふと、ひさしぶりに(一年ぶりくらい?) AMarshal に手を入れていて気になっ

34 messages 2002/08/09
[#17967] Re: Hash has default block? — "K.Kosako" <kosako@...> 2002/08/09

Tanaka Akiraさんの<hvo8z3gnvr6.fsf@coulee.a02.aist.go.jp>から

[#17969] Re: Hash has default block? — Tanaka Akira <akr@...17n.org> 2002/08/09

In article <20020809121059.B6DC51560@helium.ruby-lang.org>,

[#17977] Re: Hash has default block? — "K.Kosako" <kosako@...> 2002/08/12

Tanaka Akiraさんの<hvo65yknitf.fsf@coulee.a02.aist.go.jp>から

[#17989] Re: Hash has default block? — Tanaka Akira <akr@...17n.org> 2002/08/13

In article <20020812052018.C7F9B1671@helium.ruby-lang.org>,

[#17990] Re: Hash has default block? — matz@... (Yukihiro Matsumoto) 2002/08/13

まつもと ゆきひろです

[#17991] Re: Hash has default block? — matz@... (Yukihiro Matsumoto) 2002/08/13

まつもと ゆきひろです

[#17998] Re: Hash has default block? — "K.Kosako" <kosako@...> 2002/08/13

Yukihiro Matsumotoさんの

[#17999] Re: Hash has default block? — Tanaka Akira <akr@...17n.org> 2002/08/13

In article <20020813075933.DBB611415@helium.ruby-lang.org>,

[#18000] Re: Hash has default block? — matz@... (Yukihiro Matsumoto) 2002/08/13

まつもと ゆきひろです

[#18004] allocation framework — Tanaka Akira <akr@...17n.org> 2002/08/13

In article <1029229143.399680.2549.nullmailer@picachu.netlab.jp>,

[#18021] Re: allocation framework — matz@... (Yukihiro Matsumoto) 2002/08/15

まつもと ゆきひろです

[#18022] Re: allocation framework — Tanaka Akira <akr@...17n.org> 2002/08/15

In article <1029423141.763951.25373.nullmailer@picachu.netlab.jp>,

[#18023] Re: allocation framework — matz@... (Yukihiro Matsumoto) 2002/08/16

まつもと ゆきひろです

[#18024] Re: allocation framework — Tanaka Akira <akr@...17n.org> 2002/08/16

In article <1029464034.601483.27585.nullmailer@picachu.netlab.jp>,

[#18074] source file name at -r option — nobu.nakada@...

なかだです。

30 messages 2002/08/24
[#18352] Re: source file name at -r option — nobu.nakada@... 2002/09/22

なかだです。

[#18662] Re: ENABLE/DISABLE_TRACE (was Re: source file name at -r option) — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/11/06

なひです。

[#18663] Re: ENABLE/DISABLE_TRACE (was Re: source file name at -r option) — nobu.nakada@... 2002/11/06

なかだです。

[#18667] Re: ENABLE/DISABLE_TRACE (was Re: source file name at -r option) — matz@... (Yukihiro Matsumoto) 2002/11/06

まつもと ゆきひろです

[#18673] Re: ENABLE/DISABLE_TRACE (was Re: source file name at -r option) — nobu.nakada@... 2002/11/07

なかだです。

[#18076] Win32 signal, process etc — nobu.nakada@...

なかだです。

14 messages 2002/08/24

[#18103] autoload patch for ruby-1.7 — "Yoshinori K. Okuji" <okuji@...>

[ruby-dev:16180]でトップレベル以外の定数についてもautoloadができるよう

24 messages 2002/08/29
[#18132] Re: autoload patch for ruby-1.7 — Minero Aoki <aamine@...> 2002/09/01

あおきです。

[#18139] Re: autoload patch for ruby-1.7 — "Yoshinori K. Okuji" <okuji@...> 2002/09/01

At Sun, 1 Sep 2002 15:53:24 +0900,

[#18145] Re: autoload patch for ruby-1.7 — Minero Aoki <aamine@...> 2002/09/02

あおきです。

[#18109] mkmf.rb and extmk.rb — WATANABE Hirofumi <eban@...>

わたなべです。

24 messages 2002/08/30
[#18157] Re: mkmf.rb and extmk.rb — matz@... (Yukihiro Matsumoto) 2002/09/03

まつもと ゆきひろです

[#18159] Re: mkmf.rb and extmk.rb — WATANABE Hirofumi <eban@...> 2002/09/03

わたなべです。

[ruby-dev:18097] StringValuePtr() instead of StringValue() and RSTRING()->ptr

From: nobu.nakada@...
Date: 2002-08-29 10:56:38 UTC
List: ruby-dev #18097
なかだです。

At Thu, 29 Aug 2002 09:08:16 +0000,
matz wrote:
>     * string.c (rb_string_value_ptr): StringValuePtr() should never
>       return NULL pointer.

StringValuePtr()を使わずにStringValue()とRSTRING()->ptrを使って
るところで、問題になりそうな部分です。

DL::PtrData#[]=で、実際のデータよりも大きい長さを指定された場合
はエラーにしたほうがいいかも知れませんが。


Index: ext/Win32API/Win32API.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/Win32API/Win32API.c,v
retrieving revision 1.13
diff -u -2 -p -r1.13 Win32API.c
--- ext/Win32API/Win32API.c	11 Jun 2002 01:27:47 -0000	1.13
+++ ext/Win32API/Win32API.c	29 Aug 2002 10:01:36 -0000
@@ -250,5 +250,5 @@ Win32API_Call(argc, argv, obj)
 		    StringValue(str);
 		    rb_str_modify(str);
-		    pParam = RSTRING(str)->ptr;
+		    pParam = StringValuePtr(str)
 		}
 #if defined(_MSC_VER) || defined(__LCC__)
Index: ext/dl/ptr.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/dl/ptr.c,v
retrieving revision 1.9
diff -u -2 -p -r1.9 ptr.c
--- ext/dl/ptr.c	5 Aug 2002 01:24:13 -0000	1.9
+++ ext/dl/ptr.c	29 Aug 2002 10:45:37 -0000
@@ -859,17 +859,19 @@ rb_dlptr_aset(int argc, VALUE argv[], VA
   if( TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM ){
     void *dst, *src;
-    int len;
-    
+    long len;
+
     StringValue(val);
     Data_Get_Struct(self, struct ptr_data, data);
     dst = (void*)((long)(data->ptr) + DLNUM2LONG(key));
     src = RSTRING(val)->ptr;
+    len = RSTRING(val)->len;
     if( num == Qnil ){
-      len = RSTRING(val)->len;
+      memcpy(dst, src, len);
     }
     else{
-      len = NUM2INT(num);
+      long n = NUM2INT(num);
+      memcpy(dst, src, n < len ? n : len);
+      if( n > len ) MEMZERO((char*)dst + len, char, n - len);
     };
-    memcpy(dst, src, len);
     return val;
   };
Index: ext/nkf/nkf.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/nkf/nkf.c,v
retrieving revision 1.7
diff -u -2 -p -r1.7 nkf.c
--- ext/nkf/nkf.c	18 Jul 2001 05:55:22 -0000	1.7
+++ ext/nkf/nkf.c	29 Aug 2002 09:52:18 -0000
@@ -105,4 +105,5 @@ rb_nkf_guess(obj, src)
   p = RSTRING(src)->ptr;
   pend = p + RSTRING(src)->len;
+  if (p == pend) return INT2FIX(_UNKNOWN);
 
 #define INCR do {\
Index: ext/readline/readline.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/readline/readline.c,v
retrieving revision 1.10
diff -u -2 -p -r1.10 readline.c
--- ext/readline/readline.c	6 Aug 2002 06:20:07 -0000	1.10
+++ ext/readline/readline.c	29 Aug 2002 10:34:55 -0000
@@ -192,9 +192,7 @@ readline_s_set_completion_append_charact
 {
 #ifdef READLINE_21_OR_LATER
-    if (NIL_P(str)) {
+    if (NIL_P(str) || !StringValuePtr(str) || !RSTRING(str)->len) {
 	rl_completion_append_character = '\0';
     } else {
-	StringValue(str);
-
 	rl_completion_append_character = RSTRING(str)->ptr[0];
     }
Index: ext/socket/socket.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/socket/socket.c,v
retrieving revision 1.82
diff -u -2 -p -r1.82 socket.c
--- ext/socket/socket.c	1 Aug 2002 09:42:38 -0000	1.82
+++ ext/socket/socket.c	29 Aug 2002 10:30:20 -0000
@@ -2168,6 +2168,5 @@ sock_s_getaddrinfo(argc, argv)
 	hints.ai_family = FIX2INT(family);
     }
-    else {
-	StringValue(family);
+    else if (StringValuePtr(family)) {
 	if (strcmp(RSTRING(family)->ptr, "AF_INET") == 0) {
 	    hints.ai_family = PF_INET;
@@ -2288,6 +2287,5 @@ sock_s_getnameinfo(argc, argv)
 	    hints.ai_family = FIX2INT(af);
 	}
-	else {
-	    StringValue(af);
+	else if (StringValuePtr(af)) {
 	    if (strcmp(RSTRING(af)->ptr, "AF_INET") == 0) {
 		hints.ai_family = PF_INET;
Index: ext/tcltklib/tcltklib.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/tcltklib/tcltklib.c,v
retrieving revision 1.15
diff -u -2 -p -r1.15 tcltklib.c
--- ext/tcltklib/tcltklib.c	19 Aug 2002 05:56:07 -0000	1.15
+++ ext/tcltklib/tcltklib.c	29 Aug 2002 10:39:48 -0000
@@ -566,4 +566,5 @@ ip_toUTF8(self, str, encodename)
     StringValue(str);
     encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
+    if (!RSTRING(str)->len) return str;
     buf = ALLOCA_N(char,strlen(RSTRING(str)->ptr)+1);
     strcpy(buf, RSTRING(str)->ptr);
@@ -599,4 +600,5 @@ ip_fromUTF8(self, str, encodename)
     StringValue(str);
     encoding = Tcl_GetEncoding(interp,RSTRING(encodename)->ptr);
+    if (!RSTRING(str)->len) return str;
     buf = ALLOCA_N(char,strlen(RSTRING(str)->ptr)+1);
     strcpy(buf,RSTRING(str)->ptr);


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

In This Thread

Prev Next