From: Tadayoshi Funaba Date: 1998-03-30T09:12:57+09:00 Subject: [ruby-dev:1984] Re: experimantal release 1.1b9_06 ふなばです。 String で、capitalize、delete がうまくゆかないことがあります。intern でのエラーメッセージがおかしいです。で、あやしいところの修正をこころみ てみました (仕様のよみ違いがあったらごめんなさい)。 --- string.c.orig Sat Mar 28 20:05:46 1998 +++ string.c Mon Mar 30 08:50:42 1998 @@ -1610,8 +1610,10 @@ str_modify(str); s = RSTRING(str)->ptr; send = s + RSTRING(str)->len; - if (islower(*s)) + if (islower(*s)) { *s = toupper(*s); + modify = 1; + } while (++s < send) { if (ismbchar(*s)) { s++; @@ -1867,10 +1869,10 @@ s = t = RSTRING(str1)->ptr; send = s + RSTRING(str1)->len; while (s < send) { - if (!squeez[*s & 0xff]) { - *t++ = *s; + if (squeez[*s & 0xff]) modify = 1; - } + else + *t++ = *s; s++; } *t = '\0'; @@ -2469,7 +2471,7 @@ ID id; if (strlen(RSTRING(str)->ptr) != RSTRING(str)->len) - ArgError("string contains `\0'"); + ArgError("string contains `\\0'"); id = rb_intern(RSTRING(str)->ptr); return INT2FIX(id); } --Tadayoshi Funaba