Test code of diff algorithm writing in ruby