joyent/node — Issue #1941: util.inspect() instanceof failure
Author: TooTallNate
Created: 2011-10-26 04:41:30+00:00
State: open

``` js
> util.inspect(Object.create(Date.prototype))
TypeError: this is not a Date object.
at Date.toUTCString (native)
at formatValue (util.js:186:32)
at Object.inspect (util.js:103:10)
at repl:1:18
at REPLServer.eval (repl.js:80:21)
at Interface. (repl.js:182:12)
at Interface.emit (events.js:67:17)
at Interface._onLine (readline.js:162:10)
at Interface._line (readline.js:426:8)
at Interface._ttyWrite (readline.js:603:14)
```
^ `isDate()` returns true, incorrectly (this is a regular Object) because of the internal `instanceof`.

This popped it's head out with @isaacs global REPL patch. Pull request forthcoming...