title: Select random unique element from an array
body: <p><a href="https://stackoverflow.com/questions/3482149/how-do-i-pick-randomly-from-an-array">This question</a> goes over how to select random elements from an array using <a href="http://apidock.com/rails/Array/sample" rel="nofollow noreferrer">sample</a>, but I'd like to do this multiple times, selecting a unique one each time.</p>
  
  <p>The simplest solution I can think of is something like this, but I feel like there must be a simpler way (without modifying the original array):</p>
  
  <pre><code>myArray = ["stuff", "widget", "ruby", "goodies", "java", "emerald", "etc" ]
  
  selected = []
  
  first = myArray.sample
  selected &lt;&lt; first
  
  second = myArray.sample
  while(selected.include? second) do
    second = myArray.sample
  end
  
  selected &lt;&lt; second
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>In my specific case, I am not immediately calling one after the other, so using an argument with sample won't help</p>