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

array.c: [DOC] Make it clear that #<< modifies receiver

This patch is sent from @selmertsx (morioka shuhei).

[fix GH-1646]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2017-06-12 11:09:10 +00:00
parent 3b405a8912
commit a100bf321c

View file

@ -910,7 +910,10 @@ ary_take_first_or_last(int argc, const VALUE *argv, VALUE ary, enum ary_take_pos
* expression returns the array itself, so several appends
* may be chained together.
*
* [ 1, 2 ] << "c" << "d" << [ 3, 4 ]
* a = [ 1, 2 ]
* a << "c" << "d" << [ 3, 4 ]
* #=> [ 1, 2, "c", "d", [ 3, 4 ] ]
* a
* #=> [ 1, 2, "c", "d", [ 3, 4 ] ]
*
*/