Skip to content

Instantly share code, notes, and snippets.

@tsyber1an
Created April 29, 2013 12:49
Show Gist options
  • Save tsyber1an/5481394 to your computer and use it in GitHub Desktop.
Save tsyber1an/5481394 to your computer and use it in GitHub Desktop.
paticular unique
[[['a', 1], ['b',2], ['c',3]], [['b',2],['a',1],['c',3]], [['c',1], ['a',4], ['b',2]]].uniq{|e| e.sort_by{|l| l.first }.map{|l| l.first }.join('') }
# => [[["a", 1], ["b", 2], ["c", 3]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment