diff options
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r-- | ext/io/console/console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 7656c66c21..0b29c72c7a 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -315,7 +315,7 @@ console_set_echo(VALUE io, VALUE f) int fd; GetOpenFile(io, fptr); - fd = GetWriteFD(fptr); + fd = GetReadFD(fptr); if (!getattr(fd, &t)) rb_sys_fail(0); if (RTEST(f)) set_echo(&t); @@ -339,7 +339,7 @@ console_echo_p(VALUE io) int fd; GetOpenFile(io, fptr); - fd = GetWriteFD(fptr); + fd = GetReadFD(fptr); if (!getattr(fd, &t)) rb_sys_fail(0); return echo_p(&t) ? Qtrue : Qfalse; } |