diff options
author | Anna Henningsen <anna@addaleax.net> | 2016-11-16 02:27:14 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2016-11-20 01:40:33 +0100 |
commit | 3295a7febad0502dd79ad9fdae4c0975d1fb271c (patch) | |
tree | 9540bcbabb671a58613ecc30b4c7f5cb00c9e1b6 /test/parallel/test-util-inspect.js | |
parent | 6b86ecc007db251047c4a19990eca86af1e4c954 (diff) | |
download | node-new-3295a7febad0502dd79ad9fdae4c0975d1fb271c.tar.gz |
src: allow getting Symbols on process.env
1aa595e5bd6 introduced a `throw` for accessing `Symbol` properties of
`process.env`. However, this breaks `util.inspect(process)` and
things like `Object.prototype.toString.call(process.env)`, so this
patch changes the behaviour for the getter to just always return
`undefined`.
Ref: https://github.com/nodejs/node/pull/9446
Fixes: https://github.com/nodejs/node/issues/9641
PR-URL: https://github.com/nodejs/node/pull/9631
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-util-inspect.js')
-rw-r--r-- | test/parallel/test-util-inspect.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index f730ec1c98..7fd6829542 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -925,3 +925,5 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); util.inspect.defaultOptions = 'bad'; }, /"options" must be an object/); } + +assert.doesNotThrow(() => util.inspect(process)); |