summaryrefslogtreecommitdiff
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-26 21:21:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-26 21:21:07 +0000
commit87ba383aa38dbf81b6aa3fa9c771e7ac715f3c96 (patch)
treec9256559fb39ac0d06d53cf9413c6a279ef3014f /test/ruby/test_io_m17n.rb
parent18abe0e8c2a5ee96f6c813eac102bd75f42fb148 (diff)
* 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
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r--test/ruby/test_io_m17n.rb10
1 files changed, 10 insertions, 0 deletions
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