Skip to content

Instantly share code, notes, and snippets.

@ka8725
Created February 8, 2014 22:42
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 ka8725/8891437 to your computer and use it in GitHub Desktop.
Save ka8725/8891437 to your computer and use it in GitHub Desktop.
irb --simple-prompt
>> a = [1,2,3]
=> [1, 2, 3]
>> a.select {|e| e >= 2}
=> [2, 3]
>> a.detect {|e| e >= 2}
=> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment