title: Ruby access multiple array elemenets by indexes (sub array)
body: <p>I have an array and I have an array with indexes of certain elements from the first array. What is the best way to get the elements from the first array?</p>
  
  <p>I am doing:</p>
  
  <pre><code>result = []
  indexes.each { |current| result &lt;&lt; my_array[current] }
  </code></pre>
  
  <p>But there should be a better way..</p>