title: How can I shuffle an array/hash in Ruby?
body: <p>For learning purposes, what is this called? Is the object being created an array or a hash?</p>
  
  <pre><code>stack_of_cards = []
  </code></pre>
  
  <p>This is how I'm filling it:</p>
  
  <pre><code>stack_of_cards &lt;&lt; Card.new("A", "Spades", 1)
  stack_of_cards &lt;&lt; Card.new("2", "Spades", 2)
  stack_of_cards &lt;&lt; Card.new("3", "Spades", 3)
  ...
  </code></pre>
  
  <p>Here is my Card class:</p>
  
  <pre><code>class Card
  
    attr_accessor :number, :suit, :value
  
    def initialize(number, suit, value)
      @number = number
      @suit = suit
      @value = value
    end
  
    def to_s
      "#{@number} of #{@suit}"
    end
  end
  </code></pre>
  
  <p>I'd like to shuffle the elements in this array/hash (what is this called? :S)</p>
  
  <p>Any suggestions?</p>