Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created January 18, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/7ed4a70ffa0ec205b92a to your computer and use it in GitHub Desktop.
Save chuck0523/7ed4a70ffa0ec205b92a to your computer and use it in GitHub Desktop.
a = [1, 2, 3]
b = [4, 5, 6]
puts a.concat(b).length == a.concat(b).uniq.length # true
c = [1, 2, 3]
d = [3, 4, 5]
puts c.concat(d).length == c.concat(d).uniq.length # false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment