Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created March 27, 2015 08:16
Show Gist options
  • Save KamilLelonek/f13d48534a2885f88d41 to your computer and use it in GitHub Desktop.
Save KamilLelonek/f13d48534a2885f88d41 to your computer and use it in GitHub Desktop.
How many items does array have?
➜ ~ pry
[1] (pry) main: 0> a = [1, 2, 3]
=> [1, 2, 3]
[2] (pry) main: 0> a.count
=> 3
[3] (pry) main: 0> a.size
=> 3
[4] (pry) main: 0> a.length
=> 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment