From: Conrad Schneiker Date: 2000-07-06T04:24:20-05:00 Subject: [ruby-talk:03862] Re: Array.uniq! returning nil Hi, "Yukihiro Matsumoto" writes, > > In message "[ruby-talk:03851] Re: Array.uniq! returning nil" > on 00/07/06, "NAKAMURA, Hiroshi" writes: > > |> Hmm, I thought I (we) came to the negative conclusion. > > |Accoding Blade's nice looking threading view; > |http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/9052?9024-9551 , > |I cannot find objection to [ruby-dev:9096] and [ruby-dev:9146]. > |I thought that proposition could be accepted (for me, at least). > > Didn't I raise objection? Well, perhaps I forgot to say my opinion. > > |Nishi-san's proposition in [ruby-dev:9096]: > | String#gsub => create substituted string and returns it. > | String#gsub! => substitutes itself and returns self > | String#gsub!? => substitutes itself and returns if modification is done or not. > | String#gsub? => create substituted string and returns if modification is done or not. !?!? > > I can agree with the possibility of the combination of modify/copy, > modified-or-unmodified-string/modified-string-or-nil. But I don't > feel '?' is a good name sign for it. Neither do I. However, there don't seem to be many alternative characters that wouldn't look too strange, confusing, or cryptic. Maybe just @, $, %, &. % is suggestive of telling you if the % modification was more than zero. String#gsub String#gsub! String#gsub!% String#gsub% & is suggestive of trying something & telling you if it succeeded. String#gsub String#gsub! String#gsub!& String#gsub& Conrad.