From: Mauricio Fernandez Date: 2007-09-12T03:20:25+09:00 Subject: Re: Proposal: runtime-modifying Kernel methods should be keywords On Tue, Sep 11, 2007 at 09:05:49PM +0900, James Edward Gray II wrote: > On Sep 10, 2007, at 11:19 PM, murphy wrote: > >James Edward Gray II schrieb: > >>>gsub sets $_ in the caller's scope. > >> > >>Which is probably another feature of questionable value. I know it's > >>handy in one-liners, but outside of that code using $_ has been out of > >>fashion for some time now. > > >Is it? I've scanned my local gems, and 29 of 34 use $0-9 somewhere. For > >example, Rails and HighLine. Actually, I like it better than MatchData. > > I wasn't speaking of the $0-9 regular expression variables. Please > reread the above. As nobu said already, gsub actually sets $~, which underlies $0 and friends. -- Mauricio Fernandez