title: How to method chain shift and sample in one line
body: <p>Say you have an array:</p>
  
  <pre><code>a = [2, 5, 8]
  </code></pre>
  
  <p>To get rid of the first element, so you can use <code>shift</code>:</p>
  
  <pre><code>a.shift # =&gt; 2
  a # =&gt; [5, 8]
  </code></pre>
  
  <p>There is no problem doing <code>sample</code> on <code>a</code>:</p>
  
  <pre><code>a.sample # =&gt; 5
  </code></pre>
  
  <p>It doesn't seem possible to do both methods chained. You get </p>
  
  <pre><code>a.shift.sample # =&gt; undefined method `sample' for 2:Fixnum
  </code></pre>
  
  <p>What would be the most efficient and concise way to do this? The context is iterating through winning_combo arrays for a Ruby tic tac toe program. I do not want to modify the original array. </p>