diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Dec 2 15:30:30 2014 Martin Duerst <duerst@it.aoyama.ac.jp> + + * array.c (rb_ary_plus): in documentation, added note about + inefficiency of repeated += operations. + Tue Dec 2 07:20:21 2014 Eric Wong <e@80x24.org> * iseq.c (iseq_data_to_ary): keep hidden variables @@ -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) { |