title: Ruby : Rubeque - difficult with *n or n
body: <p>I'm doing  <a href="http://www.rubeque.com/problems/queue-continuum/solutions/51a26923ba804b00020000df" rel="nofollow">http://www.rubeque.com/problems/queue-continuum/solutions/51a26923ba804b00020000df</a> and I spent a while there. I can't realize why this code doesn't pass</p>
  
  <pre><code>def initialize(queue)
    @q = queue
  end
  
  def pop(n=1)
    @q.shift(n)
  
  end
  
  def push(arr)
    arr.each { |x|
      @q.push(x)
    }
    return true
  end
  
  def to_a
    @q
  end
  </code></pre>
  
  <p>but this works perfectly.</p>
  
  <pre><code>def initialize(queue)
    @q = queue
  end
  
  def pop(*n)
    @q.shift(*n)
  
  end
  
  def push(arr)
    @q.push(*arr)
    return true
  end
  
  def to_a
    @q
  end
  </code></pre>
  
  <p>i'm totally confused about </p>
  
  <pre><code>def pop(*n)
    @q.shift(*n)
  
  end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>def push(arr)
    @q.push(*arr)
  end
  </code></pre>
  
  <p>why should I take (arr) as array and than change it into... *arr which is Array of array? I'm confused, please help!</p>