diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-13 21:26:32 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-13 21:26:32 +0000 |
commit | 71f40a1d962572c9a863a97592222320f6702ec5 (patch) | |
tree | 0c81ef5a62f99b0ff207b53abeea1931def92434 /test | |
parent | 7c8b88a6740c4b1956f5f86febcb1aad9746a693 (diff) | |
download | ruby-71f40a1d962572c9a863a97592222320f6702ec5.tar.gz |
* test/ruby/test_io.rb: add test for IO.binread fd leak.
See r50881.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 873da119be..9b3e80160d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2740,6 +2740,10 @@ End end end + def test_s_binread_does_not_leak_with_invalid_offset + assert_raise(Errno::EINVAL) { IO.binread(__FILE__, 0, -1) } + end + def test_s_binwrite mkcdtmpdir do path = "test_s_binwrite" |