OK, I just found the wiki page where you can make suggestions for the FAQ, I will do this on that page. As an aside, could we make the FAQ itself a wiki? That way people could update it themselves. I have yet to see anarchy with a wiki - they have all been well behaved. I would even volunteer moving the current FAQ over to the wiki if people liked the idea. John. "John" <nojgoalbyspam / hotmail.com> wrote in message news:9w_X8.10957$Kx3.6313 / newsread1.prod.itd.earthlink.net... > Would it make sense to add this to the Ruby FAQ? > > On a related note, I have been reading the Programming Ruby book and there > is a pretty good section on gotchas that might also be good for the FAQ. > Not sure how the authors feel about having the information in both places? > Maybe have a link to the PR section from the FAQ? > > John. > > "Yukihiro Matsumoto" <matz / ruby-lang.org> wrote in message > news:1026541001.000220.29303.nullmailer / picachu.netlab.jp... > > Hi, > > > > In message "gsub() replacement containing replaced text" > > on 02/07/13, Harry Ohlsen <harryo / zip.com.au> writes: > > > > |I want to replace all single quotes in a string with backslask followed > by a > > |single quote. The obvious approach doesn't seem to work, presumably > because > > |the replacement contains the pattern that's been replaced. > > > > "\\'" in a replacement string is substitute by the value of $', so you > > have to say > > > > x.gsub("'", "\\\\'") > > > > matz. > > > > > > >