title: Ruby Dir['**/*'] limit?
body: <p>Is it possible to set a limit on Dir.each method? I would like to retrieve only last 10 files (ordered by create date).</p>
  
  <p>Example:</p>
  
  <pre><code>Dir[File.join(Rails.root, '*.json'), 10].each do |f|
    puts f
  end 
  </code></pre>
  
  <p>Thx.</p>