Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created June 12, 2016 18:48
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 anonymous/895cdbe3dc6bbb96a62bac41687e7159 to your computer and use it in GitHub Desktop.
Save anonymous/895cdbe3dc6bbb96a62bac41687e7159 to your computer and use it in GitHub Desktop.
irb(main):013:0> 3.times.map { |n| n == 1 }
=> [false, true, false]
irb(main):014:0> 3.times.map.count { |n| n == 1 }
=> 1
irb(main):015:0> [false, true, false].count
=> 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment