diff --git a/test/simple/test-util-inspect.js b/test/simple/test-util-inspect.js index 8c98ed21c0..a2912f762c 100644 --- a/test/simple/test-util-inspect.js +++ b/test/simple/test-util-inspect.js @@ -62,3 +62,16 @@ assert.ok(ex.indexOf('[type]') != -1); // GH-1941 // should not throw: assert.equal(util.inspect(Object.create(Date.prototype)), '{}') + +// GH-1944 +assert.doesNotThrow(function () { + var d = new Date(); + d.toUTCString = null; + util.inspect(d); +}); + +assert.doesNotThrow(function () { + var r = /regexp/; + r.toString = null; + util.inspect(r); +});