summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Romer <jmromer@users.noreply.github.com>2013-11-20 05:38:46 -0500
committerJake Romer <jmromer@users.noreply.github.com>2013-11-20 05:38:46 -0500
commit9a60d0a6e4fa2aba9d1a1cf2a834ae82b2a18aea (patch)
tree1f820656f5ec7507d6a08597bba5f600a843b3c6
parent0868977067b48eb00bdfc1dd95c82af10567162f (diff)
Corrects Array#[,] entry
The #[i,l] method returns a subarray starting at index i and continuing for length l. [source](http://ruby-doc.org/core-1.9.3/Array.html#method-i-5B-5D)
-rw-r--r--ruby.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 8723e18f..bf4cb229 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -139,8 +139,8 @@ array.[] 12 #=> nil
# From the end
array[-1] #=> 5
-# With a start and end index
-array[2, 4] #=> [3, 4, 5]
+# With a start index and length
+array[2, 3] #=> [3, 4, 5]
# Or with a range
array[1..3] #=> [2, 3, 4]