summaryrefslogtreecommitdiff
path: root/ext/io/console/console.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 08:56:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 08:56:11 +0000
commit552243aa152098835b82cddd5919585cd0b229d4 (patch)
tree5e81ed00a31ddc21b388154dd248d72c98c86d9b /ext/io/console/console.c
parent483ef372b1fc451ca902cae072cbd61756ee5323 (diff)
* ext/io/console/console.c (console_set_echo, console_echo_p): use
primary fd. [ruby-dev:41309] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r--ext/io/console/console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index 7656c66c211..0b29c72c7ac 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;
}