From 45814216ee29b8d6c5faa00c6d27b721f628a1ea Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 24 Mar 2015 22:44:08 -0700 Subject: [PATCH] doc: fix format docs discrepancy Only objects and symbols use `util.inspect`, others are simply concatenated. Fixes: https://github.com/iojs/io.js/issues/935 PR-URL: https://github.com/iojs/io.js/pull/1255 Reviewed-By: Colin Ihrig --- doc/api/util.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/util.markdown b/doc/api/util.markdown index d7abeccae46..2bc6969b539 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -63,8 +63,8 @@ not replaced. util.format('%s:%s', 'foo'); // 'foo:%s' If there are more arguments than placeholders, the extra arguments are -converted to strings with `util.inspect()` and these strings are concatenated, -delimited by a space. +coerced to strings (for objects and symbols, `util.inspect()` is used) +and then concatenated, delimited by a space. util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'