Skip to content

Instantly share code, notes, and snippets.

@Masa331
Created July 22, 2015 15:03
Show Gist options
  • Save Masa331/9da2e21c708a5fe2512b to your computer and use it in GitHub Desktop.
Save Masa331/9da2e21c708a5fe2512b to your computer and use it in GitHub Desktop.
How many symbols can you create on your system?
counter = 0
alphabet = %w(a b c d e f g h i j k l m n o p q r s t u v w x y z)
alphabet.permutation.each do |permutation|
permutation.join.to_sym
counter += 1
if counter % 100000 == 0
puts Symbol.all_symbols.size
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment