diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-23 02:25:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-23 02:25:58 +0000 |
commit | d0eea30a62b3486eb7754fc41d1d6a5b3f83a41d (patch) | |
tree | 6403eacd13fcd581c6c60a9484512f7e8639f34e /test/ruby/test_io.rb | |
parent | 211ed1b20e96af015e0676bed88f21590f4f515a (diff) | |
download | ruby-d0eea30a62b3486eb7754fc41d1d6a5b3f83a41d.tar.gz |
io.c: no restriction
* io.c (io_write_m): remove argc restriction upto IOV_MAX-1.
[Feature #9323]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 7920c60262..122e63da3a 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1226,19 +1226,13 @@ class TestIO < Test::Unit::TestCase end def test_write_with_many_arguments - pipe(proc do |w| - w.write(*(["a"] * 1023)) - w.close - end, proc do |r| - assert_equal("a" * 1023, r.read) - end) - end - - def test_write_with_too_many_arguments - with_pipe do |r, w| - assert_raise(ArgumentError) do - w.write(*(["a"] * 1024)) - end + [1023, 1024].each do |n| + pipe(proc do |w| + w.write(*(["a"] * n)) + w.close + end, proc do |r| + assert_equal("a" * n, r.read) + end) end end |