title: How can I avoid iterating over a nil array in Ruby?
body: <p>I want avoid iterating over a nil array.</p>
  
  <p>My bad solution:</p>
  
  <pre><code>if nil!=myArr
      myArr.each { |item|
        p item;
      }
   end
  </code></pre>