title: How to print an escape character in Ruby?
body: <p>I have a string containing an escape character:</p>
  
  <pre><code>word = "x\nz"
  </code></pre>
  
  <p>and I would like to print it as <code>x\nz</code>.</p>
  
  <p>However, <code>puts word</code> gives me:</p>
  
  <pre><code>x
  z
  </code></pre>
  
  <p>How do I get <code>puts word</code> to output <code>x\nz</code> instead of creating a new line?</p>