From 87ba383aa38dbf81b6aa3fa9c771e7ac715f3c96 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 26 Apr 2010 21:21:07 +0000 Subject: * io.c (select_internal): IO which cbuf is not empty is readable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io_m17n.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 98a52939d0..218a60b044 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1774,5 +1774,15 @@ EOT } end + + def test_cbuf_select + with_tmpdir { + r, w = IO.pipe + w << "\r\n" + r.set_encoding("US-ASCII:UTF-8", :universal_newline => true) + r.ungetc(r.getc) + assert_equal([[r],[],[]], IO.select([r], nil, nil, 1)) + } + end end -- cgit v1.2.3