title: ruby convert array into function arguments
body: <p>Say I have an array. I wish to pass the array to a function. The function, however, expects two arguments. Is there a way to on the fly convert the array into 2 arguments?
  For example:</p>
  
  <pre><code>a = [0,1,2,3,4]
  b = [2,3]
  a.slice(b)
  </code></pre>
  
  <p>Would yield an error in Ruby. I need to input <code>a.slice(b[0],b[1])</code> I am looking for something more elegant, as in <code>a.slice(foo.bar(b))</code>
  Thanks.</p>