I'm trying to emit two backslashes in a string (for a newline in LaTeX) and
it's proving very difficult.

Is the behaviour shown below a bug?

irb(main):054:0> '\\\\'.bytes == [92,92]
=> true
irb(main):056:0> "NL".sub('NL', '\\\\').bytes == [92,92]
=> false

Thanks,
Gavin