title: Removing all whitespace from a string in Ruby
body: <p>How can I remove all newlines and spaces from a string in Ruby?</p>
  
  <p>For example, if we have a string:</p>
  
  <pre><code>"123\n12312313\n\n123 1231 1231 1"
  </code></pre>
  
  <p>It should become this:</p>
  
  <pre><code>"12312312313123123112311"
  </code></pre>
  
  <p>That is, all whitespaces should be removed.</p>