From: John Woods Date: 2008-02-23T02:27:44+09:00 Subject: gsub("\\", "\\\\") seems unintuitive The following confusing behavior is noted in the pickaxe book (2nd ed) on page 75: # I would expect two backslashes in the result irb> puts "\\".gsub("\\","\\\\") \ # I would expect four backslashes in the result irb> puts "\\".gsub("\\","\\\\\\\\") \\ I can certainly work around it, but it seems unintuitive. Is there a reason why gsub behaves this way? Just curious...