From: Yukihiro Matsumoto Date: 2007-05-04T19:23:52+09:00 Subject: Re: RCR? Hi, In message "Re: RCR?" on Fri, 4 May 2007 19:15:44 +0900, "Robert Dober" writes: |Currently I am writing lots of code like this: | |"some string".gsub(/s/,"") # I am using more complex rgxs therefore |# String#delete is not an option. | |I would like to write |"some string".gsub(/s/) |instead. | |There are two roads to walk: |(a) Allow String#delete to have a Regex |(b) Give String#gsub, String#sub, String#gsub! and String#sub! the |empty string as default for parameter replacement. Could you tell me why you want to reduce tiny three letters? I feel like explicit empty replacement describes user's intention more precisely than omitted default empty. How do you think comparing those two: "some string".gsub(/s/,"") "some string".gsub(/s/) matz.