Skip to content

Instantly share code, notes, and snippets.

@csamuel
Created February 9, 2011 06:40
Show Gist options
  • Save csamuel/818049 to your computer and use it in GitHub Desktop.
Save csamuel/818049 to your computer and use it in GitHub Desktop.
# Prints "[2, 4]" in IRB
[1,2,3,4].select{ |x| x.even? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment