1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
hsbt 2014-07-11 07:00:49 +00:00
parent dcf296f74c
commit 94bbd10ea7
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Jul 11 15:59:42 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* array.c: Clarify documentation for Array#insert.
[ruby-core:62934] [Bug #9901]
Fri Jul 11 15:39:36 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* io.c: Improve Documentation by @dapplebeforedawn.

View file

@ -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"]