aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 00:43:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 00:43:34 +0000
commit223f9d2170b233ee395e06570b9aa8de53ff31b6 (patch)
tree4f205ff7d06d4e2ca7faa110829297580841e306 /test
parent6d8e8e4004845cd7ee2efbf2d342dd2efad6ea03 (diff)
downloadruby-223f9d2170b233ee395e06570b9aa8de53ff31b6.tar.gz
io.c: convert to string at writev
* io.c (io_fwritev): needs conversion to string before accessing the content, as well as single argument case, not to segfault. [Feature #9323] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 7f86b4ebaf..0bedebfc16 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1270,6 +1270,10 @@ class TestIO < Test::Unit::TestCase
end
end
+ def test_write_with_multiple_nonstring_arguments
+ assert_in_out_err([], "STDOUT.write(:foo, :bar)", ["foobar"])
+ end
+
def test_write_non_writable
with_pipe do |r, w|
assert_raise(IOError) do