From: "Peña, Botp" Date: 2008-04-24T19:01:13+09:00 Subject: Re: puts "\\".gsub("\\", "\\\\") From: martinus [mailto:martin.ankerl@gmail.com] # Hello, I have a mini-ruby quiz. Guess what this line of code writes to # the console, then try it for yourself: # puts "\\".gsub("\\", "\\\\") puts "\\".gsub("\\", "\\\\") \ #=> nil # Why is that so? faq. escaping the escape in sub/gsub. search the archives. maybe you want something like, puts "\\".gsub("\\"){"\\\\"} \\ #=> nil ie, use block wc is a lot more handy. kind regards -botp