在Ruby中使用Array.compact和Array.uniq方法从Array中移除元素