diff options
author | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2013-01-09 11:17:06 +0900 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-01-08 23:13:02 -0800 |
commit | 1211946a8c8b6ecad04e23d5c71783e9721a9ffe (patch) | |
tree | 8f891d9f69a15b1b15be7b340b25e262799599a4 | |
parent | 18c985919d93df97561157ab8e7de70f4e22dd44 (diff) | |
download | node-new-1211946a8c8b6ecad04e23d5c71783e9721a9ffe.tar.gz |
stream: fix typo
Also: Revert "stream: Override addListener as well as on"
This reverts commit 18c985919d93df97561157ab8e7de70f4e22dd44.
-rw-r--r-- | lib/_stream_readable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 6ea49cf0a5..d82ecaff30 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -510,7 +510,7 @@ Readable.prototype.unpipe = function(dest) { // kludge for on('data', fn) consumers. Sad. // This is *not* part of the new readable stream interface. // It is an ugly unfortunate mess of history. -Readable.prototype.addListener = Readable.prototype.on = function(ev, fn) { +Readable.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); // https://github.com/isaacs/readable-stream/issues/16 @@ -549,7 +549,7 @@ function emitDataEvents(stream, startPaused) { // convert to an old-style stream. stream.readable = true; stream.pipe = Stream.prototype.pipe; - stream.on = stream.addEventListener = Stream.prototype.on; + stream.on = stream.addListener = Stream.prototype.on; stream.on('readable', function() { readable = true; |