Created
July 25, 2011 13:08
-
-
Save myokoym/1104078 to your computer and use it in GitHub Desktop.
0〜9までの数値を重複しないように4つ並べた配列を取得する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [0-9]{4} (unique) | |
Array.new(10) {|i| i }.shuffle.slice(0, 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment