如何處理陣列裡有重複的值

Nic Lin at 
有時候會遇到倒出來的資料,可能有相同的值,但希望能把重複的值刪掉,只留下個別的值,那可以用 uniq 這個方法。 array = array.uniq 參考來源 http://stackoverflow.com/questions/5354850/how-do-i-match-two-arrays-with-duplicates-in-ruby……