[#15357] Regexp literal and Regexp.new() — TAKAHASHI Masayoshi <maki@...>
高橋征義です。
高橋征義です。むーん、問題のありかが違ったかも。
まつもと ゆきひろです
[#15369] ruby_init_loadpath() on Windows — Shugo Maeda <shugo@...>
前田です。
わたなべです。
[#15395] UnboundMethod.bind to derived class instance — nobu.nakada@...
なかだです。
まつもと ゆきひろです
なかだです。
[#15410] pp - pretty printing — Tanaka Akira <akr@...17n.org>
さて、time.rb が片付いたので、次は pp.rb のご意見募集です。
In article <hvod71ntocb.fsf@coulee.a02.aist.go.jp>,
In article <hvo1yhuqhvk.fsf@coulee.a02.aist.go.jp>,
高橋征義です。
In article <20011224230059I.maki@rubycolor.org>,
[#15411] inconsistency of STR_ASSOC — "K.Kosako" <kosako@...>
Version : 1.7 latest (2001-12-10)
[#15418] block for MatchData#select, Hash#select — nobu.nakada@...
なかだです。
[#15430] [BUG] Segmentation fault/ruby 1.7.2 (2001-12-10) — WATANABE Tetsuya <tetsu@...>
渡辺哲也です。
[#15435] Time#utcoff — Tanaka Akira <akr@...17n.org>
In article <hvosnahj702.fsf@coulee.a02.aist.go.jp>,
まつもと ゆきひろです
わたなべです。
In article <1008292110.329151.8468.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1008320813.231850.10341.nullmailer@ev.netlab.jp>,
In article <hvosnaeblzu.fsf@coulee.a02.aist.go.jp>,
[#15441] exported symbol — nobu.nakada@...
なかだです。
[#15456] irb/completion で Segmentation fault — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
まつもと ゆきひろです
On Sat, 15 Dec 2001 18:28:12 +0900
まつもと ゆきひろです
[#15464] gsub weirdness: gsub(/.*$/, "foo") — "Akinori MUSHA" <knu@...>
なんか gsub がおかしいような気がするんですが、これはこういう
青山です。
At Mon, 17 Dec 2001 05:22:53 +0900,
[#15466] listen for sockets in both IPv4 and IPv6 — Ryo HAYASAKA <ryoh@...>
早坂@北陸先端です.
[#15479] [BUG] thread with tempfile.rb — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
[#15500] Re: define_method() does not properly set noex (PR#218) — nobu.nakada@...
なかだです。
[#15505] ERb — m_seki@...
In article <20011220114249J.seki@mr.nasu.toshiba.co.jp>,
In article <m3eljr5o9m.wl@edwin.mva.biglobe.ne.jp>,
高橋征義です。
In article <20020215085405G.seki@mr.nasu.toshiba.co.jp>,
ただただしです。
まつもと ゆきひろです
新井です。
西山和広です。
>>>>> In [ruby-dev : No.15909]
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
なかだです。
At Mon, 18 Feb 2002 12:50:31 +0900,
なかだです。
In message <200202201003.g1KA3As11455@sharui.nakada.kanuma.tochigi.jp>
新井です。
あづみです。
[#15507] fileutils (2) — Minero Aoki <aamine@...>
あおきです。
高橋征義です。
あおきです。
高橋征義です。結論は最後に。
あおきです。
高橋征義です。
あおきです。
高橋征義です。
あおきです。
高橋征義です。
あおきです。
高橋征義です。
あおきです。
けいじゅ@日本ラショナルソフトウェアです.
[#15519] typo in tracer.rb (SCRIPT_LINES__) — sheepman <sheepman@...>
こんにちは。
なひです。
まつもと ゆきひろです
なひです。
[#15556] TCPSocket#open で Errno::EALREADY — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#15569] [REQ] File?chmod — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
[#15573] [patch] resolv.rb for win32 platform — Tietew <tietew-ml-ruby-dev@...>
Tietew です。
なかだです。
こんにちは、なかむら(う)です。
なかだです。
In message <20011228143615.32D8.TIETEW-ML-RUBY-DEV@tietew.net>
こんにちは、なかむら(う)です。
Tietew です。
[#15603] filename within eval — nobu.nakada@...
なかだです。
[ruby-dev:15496] string.c: use RESIZE_CAPA for capacity change.
Version : 1.7 latest (2001-12-18)
string.cの中でREALLOCしている部分で、
RSTRING(str)->aux.capaの更新が行われていない部分が数箇所あったので、
マクロを定義してREALLOCしている部分を書き換えてみました。
string.c: use RESIZE_CAPA for capacity change.
--- string.c.orig Tue Dec 18 17:46:56 2001
+++ string.c Wed Dec 19 11:42:13 2001
@@ -29,6 +29,11 @@
#define STR_ASSOC FL_USER3
+#define RESIZE_CAPA(str,capacity) do {\
+ REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
+ RSTRING(str)->aux.capa = (capacity);\
+} while (0)
+
VALUE rb_fs;
static VALUE
@@ -238,7 +243,7 @@
else if (RSTRING(str)->aux.shared) {
/* str_buf */
if (RSTRING(str)->aux.capa != RSTRING(str)->len) {
- REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + 1);
+ RESIZE_CAPA(str, RSTRING(str)->len);
}
}
RSTRING(str)->aux.shared = add;
@@ -521,7 +526,7 @@
if (len >= 0) {
if (RSTRING(str)->len < len || RSTRING(str)->len - len > 1024) {
- REALLOC_N(RSTRING(str)->ptr, char, len + 1);
+ RESIZE_CAPA(str, len);
}
RSTRING(str)->len = len;
RSTRING(str)->ptr[len] = '\0'; /* sentinel */
@@ -547,8 +552,7 @@
while (total > capa) {
capa = (capa + 1) * 2;
}
- REALLOC_N(RSTRING(str)->ptr, char, capa+1);
- RSTRING(str)->aux.capa = capa;
+ RESIZE_CAPA(str, capa);
}
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING(str)->len = total;
@@ -578,7 +582,7 @@
if (!FL_TEST(str, ELTS_SHARED) && !FL_TEST(str, STR_ASSOC)) {
return rb_str_buf_cat(str, ptr, len);
}
- REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len+1);
+ RESIZE_CAPA(str, RSTRING(str)->len + len);
if (ptr) {
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
}
@@ -616,8 +620,7 @@
while (len > capa) {
capa = (capa + 1) * 2;
}
- REALLOC_N(RSTRING(str)->ptr, char, capa+1);
- RSTRING(str)->aux.capa = capa;
+ RESIZE_CAPA(str, capa);
}
memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING(str2)->ptr, RSTRING(str2)->len);
@@ -642,7 +645,7 @@
OBJ_INFECT(str, str2);
return str;
}
- REALLOC_N(RSTRING(str)->ptr, char, len+1);
+ RESIZE_CAPA(str, len);
memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING(str)->len += RSTRING(str2)->len;
@@ -1046,7 +1049,7 @@
}
}
if (s < sbeg) {
- REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + 2);
+ RESIZE_CAPA(str, RSTRING(str)->len + 1);
s = RSTRING(str)->ptr + n;
memmove(s+1, s, RSTRING(str)->len - n);
*s = c;
@@ -1197,7 +1200,7 @@
StringValue(val);
if (len < RSTRING(val)->len) {
/* expand string */
- REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+RSTRING(val)->len-len+1);
+ RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len);
}
if (RSTRING(val)->len != len) {
@@ -1272,7 +1275,7 @@
if (FIXNUM_P(val)) {
if (RSTRING(str)->len == idx) {
RSTRING(str)->len += 1;
- REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len);
+ RESIZE_CAPA(str, RSTRING(str)->len);
}
RSTRING(str)->ptr[idx] = NUM2INT(val) & 0xff;
}
@@ -1427,8 +1430,7 @@
if (OBJ_TAINTED(repl)) tainted = 1;
plen = END(0) - BEG(0);
if (RSTRING(repl)->len > plen) {
- REALLOC_N(RSTRING(str)->ptr, char,
- RSTRING(str)->len + RSTRING(repl)->len - plen + 1);
+ RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
}
if (RSTRING(repl)->len != plen) {
memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
--
小迫@ソフネック 渋谷区恵比寿1-15-1