Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save defunkt/127519 to your computer and use it in GitHub Desktop.
Save defunkt/127519 to your computer and use it in GitHub Desktop.
{:one => 1, :two => 2}.select {|k,v| k == :one} #=> [[:one, 1]]
{:one => 1, :two => 2}.reject {|k,v| k == :one} #=> {:two=>2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment