title: escaping the .each { } iteration early in Ruby
body: <p>code:  </p>
  
  <pre><code> c = 0  
   items.each { |i|  
     puts i.to_s    
     # if c &gt; 9 escape the each iteration early - and do not repeat  
     c++  
   }  
  </code></pre>
  
  <p>I want to grab the first 10 items then leave the "each" loop.    </p>
  
  <p>What do I replace the commented line with? is there a better approach? something more Ruby idiomatic?</p>