From: matz@... (Yukihiro Matsumoto) Date: 2002-06-03T06:26:58+09:00 Subject: Re: String#slice! changed behavior Hi, In message "Re: String#slice! changed behavior" on 02/06/02, Marcin 'Qrczak' Kowalczyk writes: |> "abcd".slice(10) raises IndexError, so should "abcd".slice!(/x/), |> I thought. | |So what about "abcd".slice!('x'), "abcd"['x'] = 'y', "abcd"[/x/] = 'y' |and finally "abcd".sub!(/x/, 'y')? They all don't raise exceptions. The first three should raise exceptions. I will fix. The last one "abcd".sub!(/x/, 'y') should not, because its behavior is "to replace the first occurrence of x if any". matz.