diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 09:16:54 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 09:16:54 +0000 |
commit | 2b0014ca250ba6defec37420025ede253d485063 (patch) | |
tree | cb2b19370a626ed4a5589540c1b941abf26558ee /test | |
parent | 9c0d8283ecc8b9b1960249f65f0b0e045cc58741 (diff) |
merge revision(s) 53329: [Backport #11885]
* io.c (io_getpartial): remove unused kwarg from template
* test/ruby/test_io.rb (test_readpartial_bad_args): new
[Bug #11885]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 5d00f04ef5..d3ac0c5f01 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2997,6 +2997,17 @@ End t.kill end + def test_readpartial_bad_args + IO.pipe do |r, w| + w.write '.' + buf = String.new + assert_raise(ArgumentError) { r.readpartial(1, buf, exception: false) } + assert_raise(TypeError) { r.readpartial(1, exception: false) } + assert_equal [[r],[],[]], IO.select([r], nil, nil, 1) + assert_equal '.', r.readpartial(1) + end + end + def test_sysread_unlocktmp_ensure bug8669 = '[ruby-core:56121] [Bug #8669]' |