From: IKARASHI Akira Date: 1999-03-09T15:16:44+09:00 Subject: [ruby-dev:6151] Re: String#index 五十嵐です。 さっき送ったパッチの修正です。 エラーにする必要はないですね。 --- string.c.orig Tue Mar 9 14:44:50 1999 +++ string.c Tue Mar 9 14:45:00 1999 @@ -574,6 +574,7 @@ char *s, *e, *p; int len; + if (offset < 0) offset = 0; if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1; s = RSTRING(str)->ptr+offset; p = RSTRING(sub)->ptr; -- 五十嵐 晃(ikarashi@itlb.te.noda.sut.ac.jp)