From 30f637024b4a50d98d46496ca121f8d7dea946c7 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 13 May 2010 09:45:29 +0000 Subject: * ext/io/console/console.c (get_write_fd): return primary fd if no io is tied for writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/io/console/test_io_console.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/io/console') diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 2e46176616..7d919c758c 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -70,4 +70,13 @@ class TestIO_Console < Test::Unit::TestCase } end + def test_oflush + PTY.open {|m, s| + s.print "a\n" + s.oflush + s.print "b\n" + assert_equal("b\r\n", m.readpartial(10)) + } + end + end -- cgit v1.2.3