From: WATANABE Hirofumi Date: 1997-06-19T09:38:15+09:00 Subject: [ruby-list:3158] Re: String split method bug? わたなべです. Yukihiro Matsumoto writes: :|> + else if (lim > i) { :|> + ary_push(result, str_new(0,0)); :|> } : :この部分です. split(//) だと lim も i も初期化されないからか. これでどうでしょう. -- わたなべひろふみ --- string.c.orig Tue Jun 3 09:58:35 1997 +++ string.c Thu Jun 19 09:33:25 1997 @@ -1773,3 +1773,2 @@ beg = start; - if (!NIL_P(limit) && lim <= ++i) break; } @@ -1800,2 +1799,5 @@ ary_push(result, str_subseq(str, beg, -1)); + } + else if (!NIL_P(limit) && lim >= i) { + ary_push(result, str_new(0, 0)); }