From a142a45f438fa3064b14e5dbd8c472ecd0ce4a63 Mon Sep 17 00:00:00 2001 From: Chris Hutchinson Date: Thu, 12 Jan 2017 15:54:37 -0500 Subject: [PATCH 1/2] Completed the challenge --- anagram_detector.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/anagram_detector.rb b/anagram_detector.rb index f67e128..b93d225 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.join end def detect_anagram(word1, word2) From f31dfe31f8ffe16f6674709ef40711f446a12087 Mon Sep 17 00:00:00 2001 From: Chris Hutchinson Date: Mon, 16 Jan 2017 11:14:55 -0500 Subject: [PATCH 2/2] Removed join from canonical --- anagram_detector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anagram_detector.rb b/anagram_detector.rb index b93d225..82731ec 100644 --- a/anagram_detector.rb +++ b/anagram_detector.rb @@ -1,6 +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.join + word.downcase.chars.sort end def detect_anagram(word1, word2)