refactored anagram.rb per iteration 6 of exercism