mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/io/console/console.c (console_dev): console should be
unbuffered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a7b0b52f09
commit
73c6b9d453
3 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
||||||
Mon Jun 13 23:28:50 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Jun 13 23:33:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/io/console/console.c (console_dev): console should be
|
||||||
|
unbuffered.
|
||||||
|
|
||||||
* ext/io/console/console.c (console_dev): take care of no-ctty
|
* ext/io/console/console.c (console_dev): take care of no-ctty
|
||||||
case.
|
case.
|
||||||
|
|
|
@ -587,7 +587,9 @@ console_dev(VALUE klass)
|
||||||
fptr->f2 = ofptr->f;
|
fptr->f2 = ofptr->f;
|
||||||
ofptr->f = 0;
|
ofptr->f = 0;
|
||||||
# endif
|
# endif
|
||||||
|
optr->mode |= FMODE_SYNC;
|
||||||
#endif
|
#endif
|
||||||
|
fptr->mode |= FMODE_SYNC;
|
||||||
rb_const_set(klass, id_console, con);
|
rb_const_set(klass, id_console, con);
|
||||||
}
|
}
|
||||||
return con;
|
return con;
|
||||||
|
|
|
@ -148,6 +148,10 @@ class TestIO_Console < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_sync
|
||||||
|
assert(helper {IO.console.sync}, "console should be unbuffered")
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def helper
|
def helper
|
||||||
m, s = PTY.open
|
m, s = PTY.open
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue