diff options
author | isaacs <i@izs.me> | 2013-01-08 14:27:01 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-01-08 14:27:01 -0800 |
commit | 18c985919d93df97561157ab8e7de70f4e22dd44 (patch) | |
tree | 375554de049fc029b75c841e3e02d26492beb32f | |
parent | 45941811dce8988a4cc296436a8843d511ae35af (diff) | |
download | node-new-18c985919d93df97561157ab8e7de70f4e22dd44.tar.gz |
stream: Override addListener as well as on
For the compatibility switch.
-rw-r--r-- | lib/_stream_readable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 7d32e3fece..6ea49cf0a5 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.on = function(ev, fn) { +Readable.prototype.addListener = Readable.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); // https://github.com/isaacs/readable-stream/issues/16 |