Ruby anagram solver