diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-11 07:00:49 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-11 07:00:49 +0000 |
commit | 94bbd10ea71120d7f21e1025d1f1a3b804db770e (patch) | |
tree | feb013d22c55e18c92f872128eef2227b8aa6fad /array.c | |
parent | dcf296f74c6dd8f2d3fddab00f3b0f621d74ef40 (diff) | |
download | ruby-94bbd10ea71120d7f21e1025d1f1a3b804db770e.tar.gz |
* array.c: Clarify documentation for Array#insert.
[ruby-core:62934] [Bug #9901]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1742,7 +1742,9 @@ fixnum: * Inserts the given values before the element with the given +index+. * * Negative indices count backwards from the end of the array, where +-1+ is - * the last element. + * the last element. If a negative index is used, the given values will be + * inserted after that element, so using an index of +-1+ will insert the + * values at the end of the array. * * a = %w{ a b c d } * a.insert(2, 99) #=> ["a", "b", 99, "c", "d"] |