Hi,
In message "[ruby-talk:01229] A vote for old behavior"
on 00/02/03, Dave Thomas <Dave / thomases.com> writes:
|Could I put in a vote for a return to the old behavior of 'gsub!' ?
|
|Sometimes it's nice to be able to write
|
| 1 while gsub!(....)
|
|(for example while matching nested syntactical constructs)
After discussing seriously at ruby-dev mail list, I changed my mind
(again) to restore old behavior. Sorry for confusion I may cause.
As I state before:
In message "[ruby-talk:01230] Re: A vote for old behavior"
on 00/02/04, Yukihiro Matsumoto <matz / netlab.co.jp> writes:
|Method chain like `str.gsub!(pat,repl).gsub!(pat,repl)' is error
|prone, I think. That's why I changed the behavior.
But since I confirmed there's little performance gain by avoiding
string copies using bang methods, there's no need to drop modify
infomation, and to introduce backward incompatibility.
matz.