node/doc/api
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
..
_toc.markdown doc: add error documentation 2015-02-10 17:58:10 -08:00
addons.markdown docs: link to more up-to-date v8 docs 2015-07-16 15:57:06 -07:00
all.markdown doc: add error documentation 2015-02-10 17:58:10 -08:00
assert.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
buffer.markdown buffer: fix case of one buffer passed to concat 2015-08-04 11:56:12 -07:00
child_process.markdown doc: remove comma splice 2015-06-07 22:25:24 +02:00
cluster.markdown cluster: emit 'message' event on cluster master 2015-07-23 14:51:10 -07:00
console.markdown doc: document Console class 2015-04-11 06:47:30 +02:00
crypto.markdown doc: add references to crypto.getCurves() 2015-06-09 22:17:55 +02:00
debugger.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
dgram.markdown dgram: make send cb act as "error" event handler 2015-08-04 11:56:12 -07:00
dns.markdown net: do not set V4MAPPED on FreeBSD 2015-08-04 11:56:10 -07:00
documentation.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
domain.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
errors.markdown doc: change effect to affect in errors.md 2015-02-11 14:24:43 -05:00
events.markdown doc: properly inheriting from EventEmitter 2015-07-29 14:57:58 +05:30
fs.markdown doc,test: documents behaviour of non-existent file 2015-08-04 22:31:01 +05:30
globals.markdown doc: update node.js references in api docs 2015-02-07 17:07:15 -05:00
http.markdown doc: fix http.IncomingMessage.socket documentation 2015-06-02 00:04:21 +02:00
https.markdown doc: fix some cross-references 2015-05-02 14:07:21 +02:00
index.markdown Remove util.print from docs 2010-11-07 17:22:56 -08:00
modules.markdown doc: minor clarification in the modules API doc. 2015-06-16 05:42:05 +03:00
net.markdown doc: a listener, not "an" listener 2015-07-28 11:06:14 -07:00
os.markdown os: add homedir() 2015-06-05 22:58:14 -04:00
path.markdown doc,test: empty strings in path module 2015-07-14 08:56:50 -07:00
process.markdown doc: don't recommend domains for error handling 2015-07-03 15:22:27 -06:00
punycode.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
querystring.markdown doc: add explanations for querystring 2015-03-03 10:03:42 -05:00
readline.markdown repl: add mode detection, cli persistent history 2015-04-30 19:33:05 -07:00
repl.markdown doc: note about custom inspect functions 2015-07-25 00:09:56 +05:30
smalloc.markdown doc: deprecate smalloc module 2015-04-30 19:44:49 +02:00
stream.markdown doc: make the abbreviation 1MM clear 2015-06-25 11:42:09 -04:00
string_decoder.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
synopsis.markdown doc: update node.js references in api docs 2015-02-07 17:07:15 -05:00
timers.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
tls.markdown tls: add getTicketKeys()/setTicketKeys() 2015-07-23 11:13:26 -07:00
tty.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
url.markdown doc: state url decoding behavior 2015-05-25 13:50:53 +02:00
util.markdown doc: fix util.deprecate example 2015-04-28 10:12:13 -04:00
v8.markdown src: add type check to v8.setFlagsFromString() 2015-05-08 19:09:45 +02:00
vm.markdown doc: fix vm module examples 2015-03-13 23:14:20 +01:00
zlib.markdown doc: update stability index 2015-02-27 14:23:01 -08:00