Skip to content

Commit

Permalink
array.c: [DOC] Make it clear that #<< modifies receiver
Browse files Browse the repository at this point in the history
This patch is sent from @selmertsx (morioka shuhei).

[fix rubyGH-1646]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
k0kubun committed Jun 12, 2017
1 parent 3b405a8 commit a100bf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ]
*
*/
Expand Down

0 comments on commit a100bf3

Please sign in to comment.