From d9ae74019ef6982acb45d2688d71b99f2191b38d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 20 Oct 2020 19:20:17 +0800 Subject: fix(cli): use rid getter for stdio (#8014) This changes the rid of Deno.stdin, Deno.stdout, Deno.stderr from a mutable property into a getter to match the rid semantics of Deno.File. --- cli/rt/30_files.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'cli/rt') diff --git a/cli/rt/30_files.js b/cli/rt/30_files.js index e492da218..679b184fd 100644 --- a/cli/rt/30_files.js +++ b/cli/rt/30_files.js @@ -109,7 +109,10 @@ class Stdin { constructor() { - this.rid = 0; + } + + get rid() { + return 0; } read(p) { @@ -127,7 +130,10 @@ class Stdout { constructor() { - this.rid = 1; + } + + get rid() { + return 1; } write(p) { @@ -145,7 +151,10 @@ class Stderr { constructor() { - this.rid = 2; + } + + get rid() { + return 2; } write(p) { -- cgit v1.2.3