陣列中最長的元素 Jan 5th, 2017 5:10 am 1 2 3 4 arr =[["I","block"],["love","wikipedia"],["apple","worst"]] arr.collect{|i| i[1]}.max_by(&:length).length arr.collect(&:first)