diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-27 10:09:55 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-27 10:09:55 +0000 |
commit | 1c35277c2bfecaf1128f05d8644b247fbd5ef461 (patch) | |
tree | 4705051973ada3642c22474eebc97f4a508a646d /test/ruby/test_io.rb | |
parent | 6eb8acae90ce774c054f0ea9b393df5a7601ffd7 (diff) | |
download | ruby-1c35277c2bfecaf1128f05d8644b247fbd5ef461.tar.gz |
* io.c (rb_io_autoclose_p): Don't raise on frozen IO.
* test/lib/minitest/unit.rb: IO#autoclose? may raise IOError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 0d5671a267..4cfd873a0d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2796,6 +2796,13 @@ End end end + def test_frozen_autoclose + with_pipe do |r,w| + fd = r.fileno + assert_equal(true, r.freeze.autoclose?) + end + end + def test_sysread_locktmp bug6099 = '[ruby-dev:45297]' buf = " " * 100 |