@ -55,17 +55,14 @@ inherits(Parser, EventEmitter);
Parser . prototype . setStream = function ( stream ) {
Parser . prototype . setStream = function ( stream ) {
if ( /^v0\.8\./ . test ( process . version ) ) {
if ( /^v0\.8\./ . test ( process . version ) ) {
var newStream = new ReadableStream ( ) ,
this . _stream = ( new ReadableStream ( ) ) . wrap ( stream ) ;
wrapped = newStream . wrap ( stream ) ;
// as of now, 07/02/2013, the readable-stream module is behind in updates
// since Readable.wrap() proxies events, we need to remove at least the
// and has different behavior for the return value of wrap() compared to
// proxied 'error' event since this can cause problems and Parser doesn't
// node v0.10+, so we check for that here ...
// care about such events
if ( wrapped )
stream . _events . error . pop ( ) ;
stream = wrapped ;
} else
else
this . _stream = stream ;
stream = newStream ;
}
this . _stream = stream ;
} ;
} ;
Parser . prototype . _tryread = function ( n ) {
Parser . prototype . _tryread = function ( n ) {