From: Nobuyoshi Nakada Date: 2007-07-13T16:09:40+09:00 Subject: Re: Proposal: runtime-modifying Kernel methods should be keywords Hi, At Fri, 13 Jul 2007 15:55:40 +0900, Charles Oliver Nutter wrote in [ruby-core:11647]: > > |- the feature can't be wrapped in another method and maintain the same > > |behavior as if it were called in the original context > > | > > |All those listed so far fit these criteria. > > > > String#gsub ? > > gsub needs access to internal structures (namely, the in-memory > representation of a String) but it can successfully be wrapped with > another method. I think both criteria must be met, since being able to > wrap a method means it's not doing anything weird with the caller's > logical binding/frame/scope. gsub sets $_ in the caller's scope. -- Nobu Nakada