On Sat, Sep 28, 2002 at 04:54:55PM -0400, Philip Mak wrote:
> irb(main):016:0> '&'.gsub(/&/, "\\\&")
> "&"
> irb(main):017:0> '&'.gsub(/&/, "\\\\&")
> "\\&"
> 
> Have I stumbled upon a bug? It refuses to add a single backslash;
> always zero or two.

Never mind, I was just reading it wrong. "\\&" is actually '\&'; it's
just the way irb displays strings.