Skip to content

Instantly share code, notes, and snippets.

@toddsiegel
Created December 14, 2012 15:57
Show Gist options
  • Save toddsiegel/4286455 to your computer and use it in GitHub Desktop.
Save toddsiegel/4286455 to your computer and use it in GitHub Desktop.
Ruby anagram finder that fit in a tweet.
IO.readlines("/usr/share/dict/words").map{|w| w.chomp}.select{|w| w.downcase.chars.sort.join == word.chars.sort.join}.reject{|w| w == word}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment