aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
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 /io.c
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 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 5f3b45919f..a4afeafc60 100644
--- a/io.c
+++ b/io.c
@@ -1590,7 +1590,7 @@ io_fwritev(int argc, VALUE *argv, rb_io_t *fptr)
tmp_array = ALLOCV_N(VALUE, v2, argc);
for (i = 0; i < argc; i++) {
- str = argv[i];
+ str = rb_obj_as_string(argv[i]);
converted = 0;
str = do_writeconv(str, fptr, &converted);
if (converted)