summaryrefslogtreecommitdiffhomepage
path: root/ruby.html.markdown
diff options
context:
space:
mode:
authorIan Bertolacci <ian.bertolacci@gmail.com>2015-10-02 10:15:08 -0600
committerIan Bertolacci <ian.bertolacci@gmail.com>2015-10-02 10:15:08 -0600
commit53790a00980f0ab58efeea5a20c97366daeca401 (patch)
tree60cced8d7b62becacd31b6fb56d9a7c41f1de809 /ruby.html.markdown
parent938720074b8b18a9ada93fb8a040b9ca1a813747 (diff)
parentd5b5b19ca909b573d0b0623604f1ff9369ab04ff (diff)
Merge branch 'master' of github.com:adambard/learnxinyminutes-docs
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r--ruby.html.markdown2
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 66a0774d..7bd28d86 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -173,6 +173,8 @@ array[1..3] #=> [2, 3, 4]
# Add to an array like this
array << 6 #=> [1, 2, 3, 4, 5, 6]
+# Or like this
+array.push(6) #=> [1, 2, 3, 4, 5, 6]
# Check if an item exists in an array
array.include?(1) #=> true