2012-06-25 72 views

回答

6
a.each_with_index.max_by { |x,i| x.length }.last 
2

发现:a.each_with_index.max_by {|x, idx| x.length }