From 84b05d48d943e5b5e88485be129755277bedd1cb Mon Sep 17 00:00:00 2001 From: Johnny Ray Austin Date: Sun, 18 Jan 2015 20:48:32 -0500 Subject: [PATCH] doc: update writable streams default encoding Setting the default encoding for a writable stream does not return a boolean (true if successful or false if not) as the docs indicate. Instead, if the operation is successful nothing is returned and the method throws an error when something goes wrong. This stems from a contribution that was tweaked but the docs were never updated accordingly. PR-URL: https://github.com/iojs/io.js/pull/502 Reviewed-By: Rod Vagg --- doc/api/stream.markdown | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index d3422e31cbb8a1..943718660cbcb8 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -567,10 +567,8 @@ Flush all data, buffered since `.cork()` call. #### writable.setDefaultEncoding(encoding) * `encoding` {String} The new default encoding -* Return: `Boolean` -Sets the default encoding for a writable stream. Returns `true` if the encoding -is valid and is set. Otherwise returns `false`. +Sets the default encoding for a writable stream. #### writable.end([chunk][, encoding][, callback])