title: How do I push an object to an array x amount of times with Ruby?
body: <p>If <code>array = [1,2,3,4,5]</code>, how can I push the number <code>6</code>, <code>x</code> amount of times to the <code>array</code>.</p>
  
  <pre><code>array.push(6) * x
  </code></pre>
  
  <p>When I run something like that it returns the entire array that was pushed <code>6</code>, <code>x</code> amount of times. Putting <em>parentheses</em> around the <code>push * x</code> makes my code invalid, any suggestions?</p>
  
  <p>Example:</p>
  
  <pre><code>array.push(6) "2 times" =&gt; [1,2,3,4,5,6,6]
  </code></pre>