From: Alan Moore Date: 2001-10-28T01:20:35+09:00 Subject: [ruby-talk:23637] Re: chop and chomp matz wrote: >Ignoring '$/' at all is backward incompatible. I like your proposed >behavior, but I'm not sure "when" we can apply your behavior, in >compatible fashion. I'm (kinda) responsible to crash as few programs >as possible when I change Ruby. I admit I often fail though. ;-( How disruptive would it really be, I wonder? It depends on how many people use '$/' to control chomp's behavior, and why. I would guess that relatively few do so, and that most of those are just setting it to "\r\n" or "\r" anyway--they wouldn't be affected at all. But I agree that it would be too abrupt a change to make in one shot. One thing you might do is to have chomp use the value of '$/' only if it's _not_ one of the standard line separators ("\n", "\r\n", or "\r"). If it does hold one of those values, chomp would look for all three. Then you could deprecate the use of '$/' with chomp and phase it out over a couple of releases. And the same goes for each_line, of course. --Alan