diff --git a/lib/net.js b/lib/net.js index d28483dd3c..c2f320d75a 100644 --- a/lib/net.js +++ b/lib/net.js @@ -606,7 +606,7 @@ Socket.prototype.__defineGetter__('localPort', function() { Socket.prototype.write = function(chunk, encoding, cb) { if (!util.isString(chunk) && !util.isBuffer(chunk)) throw new TypeError('invalid data'); - return stream.Duplex.prototype.write.apply(this, arguments); + return stream.Duplex.prototype.write.call(this, chunk, encoding, cb); };