[ruby] v1 of anagram