Skip to content

Instantly share code, notes, and snippets.

@justinko
Created October 17, 2011 02:22
Show Gist options
  • Save justinko/1291803 to your computer and use it in GitHub Desktop.
Save justinko/1291803 to your computer and use it in GitHub Desktop.
ruby-1.9.3-preview1 :070 > a = [Array, String, Class.new(String)]
=> [Array, String, #<Class:0x007fcab38332b0>]
ruby-1.9.3-preview1 :071 > a.shuffle
=> [#<Class:0x007fcab38332b0>, String, Array]
ruby-1.9.3-preview1 :072 > a.shuffle(random: Random.new(1))
=> [Array, #<Class:0x007fcab38332b0>, String]
ruby-1.9.3-preview1 :073 > a.shuffle(random: Random.new(1))
=> [Array, #<Class:0x007fcab38332b0>, String]
ruby-1.9.3-preview1 :074 > a.shuffle(random: Random.new(2))
=> [#<Class:0x007fcab38332b0>, Array, String]
ruby-1.9.3-preview1 :075 > a.shuffle(random: Random.new(2))
=> [#<Class:0x007fcab38332b0>, Array, String]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment