title: Ruby Data Structure - Queue with Maximum
body: <p>I'm looking for a Ruby data structure with the following characteristics and am hoping to not have to roll my own:</p>
  
  <ol>
  <li>First-in-first-out (i.e. a queue)</li>
  <li>Allows specifying a max length</li>
  <li>When the queue reaches capacity, the new item is pushed in and the oldest item is discarded.</li>
  </ol>
  
  <p>I thought <a href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/thread/rdoc/SizedQueue.html" rel="nofollow">SizedQueue</a> might have done the job but it doesn't satisfy criteria #3 as it blocks pushing when the max length is reached.</p>
  
  <p>Anyone know of such a beast in a well maintained library?</p>
  
  <p>Thanks.</p>