inspect: fix console.log(%s, { [Symbol.toPrimitive]: () => hello })
console.log("%s", o)
invokes the inspect
method to retrieve the object. This results in console.log("%s", { [Symbol.toPrimitive]: () => "hello" })
displaying the object itself, rather than 'hello'.
Fixes: #50909 (closed)