Skip to content

Instantly share code, notes, and snippets.

@coreyhaines
Created August 11, 2013 19:29
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 coreyhaines/6206505 to your computer and use it in GitHub Desktop.
Save coreyhaines/6206505 to your computer and use it in GitHub Desktop.
class Array
def except(*e)
self - e
end
end
# >> [1, 2, 3].except 2
# => [1, 3]
# >> [1, 2, 3].except 3
# => [1, 2]
# >> [1, 2, 3].except 4
# => [1, 2, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment