Files
node/lib
Sakthipriyan Vairamani eea66e2a7b buffer: fix case of one buffer passed to concat
Fix Buffer.concat() so a copy is always returned regardless of the
number of buffers that were passed.

Previously if the array length was one then the same same buffer was
returned. This created a special case for the user where there was a
chance mutating the buffer returned by .concat() could mutate the buffer
passed in.

Also fixes an inconsistency when throwing if an array member was not a
Buffer instance. For example:

    Buffer.concat([42]);      // Returns 42
    Buffer.concat([42, 1]);  // Throws a TypeError

Now .concat() will always throw if an array member is not a Buffer
instance.

See: https://github.com/nodejs/io.js/issues/1891
PR-URL: https://github.com/nodejs/io.js/pull/1937
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-08-04 11:56:12 -07:00
..
2015-06-15 16:37:37 +02:00
2015-06-11 20:24:44 +02:00
2015-06-11 20:24:44 +02:00
2015-06-11 20:24:44 +02:00
2015-05-09 12:10:02 +09:00
2015-01-21 16:21:31 -05:00
2015-07-10 14:23:18 -07:00
2015-07-27 11:48:36 -07:00
2015-08-04 11:56:10 -07:00
2015-06-11 20:24:44 +02:00
2015-06-15 16:37:37 +02:00
2015-06-11 20:24:44 +02:00
2015-05-25 10:14:18 -04:00
2015-06-11 20:24:44 +02:00
2015-06-30 13:47:57 -07:00
2015-07-27 17:14:08 -07:00
2015-04-29 19:33:43 +02:00
2015-01-31 23:47:29 -05:00