From a8fd9c476611652cb4ac09a0c536c4b19a014cd6 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 --- 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 d7abeccae46977..2bc6969b539e24 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'