First attempt to solve anagram in Ruby