Skip to content

Commit

Permalink
[js] Make nqp::getstdin/nqp::getstdout/nqp::getstderr be true when bo…
Browse files Browse the repository at this point in the history
…olified
  • Loading branch information
pmurias committed Oct 10, 2015
1 parent 9a8dda4 commit dfd7301
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/vm/js/nqp-runtime/io.js
Expand Up @@ -280,10 +280,15 @@ op.getenvhash = function() {

function Stderr() {
}

Stderr.prototype.printfh = function(msg) {
process.stderr.write(msg);
};

Stderr.prototype.$$to_bool = function(ctx) {
return 1;
};

op.getstderr = function() {
return new Stderr();
};
Expand All @@ -293,12 +298,22 @@ function Stdout() {
Stdout.prototype.printfh = function(msg) {
process.stdout.write(msg);
};

Stdout.prototype.$$to_bool = function(ctx) {
return 1;
};

op.getstdout = function() {
return new Stdout();
};

function Stdin() {
}

Stdin.prototype.$$to_bool = function(ctx) {
return 1;
};

op.getstdin = function() {
return new Stdin();
};
Expand Down

0 comments on commit dfd7301

Please sign in to comment.