Array#uniq accept block argument, later Ruby 1.9.2

[
  [1,"eric", 23, "seattle"],
  [1,"eric", 23, "chicago"]
].uniq{|l|[l[1], l[3]]}

#=> [[1, "eric", 23, "seattle"], [1, "eric", 23, "chicago"]]

[
  [1,"eric", 23, "seattle"],
  [2,"eric", 45, "seattle"]
].uniq{|l|[l[1], l[3]]}

#=> [[1, "eric", 23, "seattle"]]

-- 
Posted via http://www.ruby-forum.com/.