From: Bill Kelly Date: 2004-12-10T03:51:43+09:00 Subject: Re: [rcr] String#split behaves odd Hi, From: "trans. (T. Onoma)" > On Wednesday 08 December 2004 07:42 am, Austin Ziegler wrote: > | On Wed, 8 Dec 2004 15:56:01 +0900, trans. (T. Onoma) > | > | > Make default behavior -1. > | > | No. Most of the time, I don't actually *want* all the extra crap when > | I split. This change would break a lot of code silently. > > Really? In all my code I either had to put the -1 in b/c I was getting > unexpected results (wasting many hours, btw!); or it didn't really matter > either way --empty strings usually end up in no-effect results. > > Might it break code? Sure. But a lot? I doubt it. In fact I suspect some of > those same programs might have edge cases that would break them for the lack > of the -1. I'm pretty sure it would break a lot of my code. I'm used to #split working as it does since I came from Perl, but my point in saying that is not to bless the way Perl did it, but that I am very careful about whether I want trailing fields or not. I haven't surveyed my code, but I'm pretty sure I rely on the precise behavior of split. . . FWIW, Regards, Bill