diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-02 06:30:05 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-02 06:30:05 +0000 |
commit | 24f5f816ff03621897a4c8b18393d3d027d1f02a (patch) | |
tree | 472cf50551f99a0ba32cfe8165e744b47873de33 /array.c | |
parent | 062f0eddc75495cc281dc5919e07b503e9931977 (diff) | |
download | ruby-24f5f816ff03621897a4c8b18393d3d027d1f02a.tar.gz |
array.c (rb_ary_plus): in documentation, added note about
inefficiency of repeated += operations. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -3525,9 +3525,17 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary) * c #=> [ "a", "b", "c", "d", "e", "f" ] * a #=> [ "a", "b", "c" ] * + * Note that + * x += y + * is the same as + * x = x + y + * This means that it produces a new array. As a consequence, + * repeated use of += on arrays can be quite inefficient. + * * See also Array#concat. */ + VALUE rb_ary_plus(VALUE x, VALUE y) { |