Skip to content

Instantly share code, notes, and snippets.

@pete
Created March 30, 2009 22:40
Show Gist options
  • Save pete/87927 to your computer and use it in GitHub Desktop.
Save pete/87927 to your computer and use it in GitHub Desktop.
h = {}
ary.each { |i|
if h[[i.foo, i.bar]]
i.is_a_dup!
else
h[[i.foo, i.bar]] = true
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment