title: Replace Empty Cells in Array With Nil in Ruby?
body: <p>I have a two-dimensional array of a bunch of strings, including some empty strings. I want to replace the empty strings with nil. How do I do this in Ruby?</p>
  
  <p>Sample array:</p>
  
  <pre><code>[['cat','','dog',''],['','','fish','','horse']]
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>[['cat',nil,'dog',nil],[nil,nil,'fish',nil,'horse']]
  </code></pre>