From a100bf321c7f3a6eb97133735f5d73a1fc92a405 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Mon, 12 Jun 2017 11:09:10 +0000 Subject: 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 --- array.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index bd13a53430..278789dfc0 100644 --- a/array.c +++ b/array.c @@ -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 ] ] * */ -- cgit v1.2.3