diff --git a/anagram_detector.rb b/anagram_detector.rb index f67e128..82731ec 100644 --- a/anagram_detector.rb +++ b/anagram_detector.rb @@ -1,5 +1,6 @@ # Implement this in such a way that when called below, detect_anagram will result in true or false. def canonical(word) + word.downcase.chars.sort end def detect_anagram(word1, word2)