FB55/node — comment on commit 46a087cca4b15466bd24a51ee5e9d40b5947b778
File: lib/querystring.js line 31
By isaacs:

That doesn't work. The `.call` function method must be called with a Function as `this`.

You *could* do `var hasOwnProperty = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty)` here, but again, that's not an improvement.

> var o = {"foo":"bar"}
> Object.prototype.hasOwnProperty.call(o, "foo")
true
> var hasOwnProperty = Object.prototype.hasOwnProperty.call
> hasOwnProperty(o, "foo")
TypeError: object is not a function
at CALL_NON_FUNCTION (native)
at repl:1:2
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)
at ReadStream. (readline.js:82:12)
at ReadStream.emit (events.js:88:20)
> var hasOwnProperty = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty)
> hasOwnProperty(o, "foo")
true