Skip to content

Commit a9fe755

Browse files
committed
fixup! net: refactor to use more primordials
1 parent d4128fd commit a9fe755

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/net.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function Socket(options) {
305305
options.autoDestroy = true;
306306
// Handle strings directly.
307307
options.decodeStrings = false;
308-
ReflectApply(stream.Duplex, this, [options]);
308+
ReflectApply(stream.Duplex, this, arguments);
309309

310310
if (options.handle) {
311311
this._handle = options.handle; // private
@@ -442,7 +442,7 @@ function afterShutdown() {
442442
function writeAfterFIN(chunk, encoding, cb) {
443443
if (!this.writableEnded) {
444444
return ReflectApply(
445-
stream.Duplex.prototype.write, this, [chunk, encoding, cb]);
445+
stream.Duplex.prototype.write, this, arguments);
446446
}
447447

448448
if (typeof encoding === 'function') {
@@ -586,7 +586,7 @@ Socket.prototype._read = function(n) {
586586

587587

588588
Socket.prototype.end = function(data, encoding, callback) {
589-
ReflectApply(stream.Duplex.prototype.end, this, [data, encoding, callback]);
589+
ReflectApply(stream.Duplex.prototype.end, this, arguments);
590590
DTRACE_NET_STREAM_END(this);
591591
return this;
592592
};
@@ -620,7 +620,7 @@ Socket.prototype.read = function(n) {
620620
!this._handle.reading) {
621621
tryReadStart(this);
622622
}
623-
return ReflectApply(stream.Duplex.prototype.read, this, [n]);
623+
return ReflectApply(stream.Duplex.prototype.read, this, arguments);
624624
};
625625

626626

0 commit comments

Comments
 (0)