Bugfix: 'data' event for stdio should emit a string
authorRyan Dahl <ry@tinyclouds.org>
Mon, 12 Oct 2009 19:09:18 +0000 (21:09 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 12 Oct 2009 19:09:26 +0000 (21:09 +0200)
Was emitting a single element array where array[0] was the input.

src/node_stdio.cc

index e4f2904..00c8379 100644 (file)
@@ -27,10 +27,7 @@ EmitInput (Local<Value> input)
 {
   HandleScope scope;
 
-  Local<Array> args = Array::New(1);
-  args->Set(Integer::New(0), input);
-
-  Local<Value> argv[2] = { String::NewSymbol("data"), args };
+  Local<Value> argv[2] = { String::NewSymbol("data"), input };
 
   emit->Call(stdio, 2, argv);
 }