From 18c985919d93df97561157ab8e7de70f4e22dd44 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 8 Jan 2013 14:27:01 -0800 Subject: [PATCH] stream: Override addListener as well as on For the compatibility switch. --- lib/_stream_readable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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