util: avoid inline access to Symbol.iterator
Currently util.inspect
has the inline access to Symbol.iterator
to check if the value to be inspected is an iterator, but it could throw when the value of [Symbol.iterator]
throws(has) an error.
This PR replaced the inline access with in
operator to be able to inspect correctly.