summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 13:48:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 13:48:53 +0000
commitcb6602490b055fba2a1a340ffa1e276c0b9cff95 (patch)
tree650cbfb8dd48fb9a8655ec8b6aa48a72d163a04b /io.c
parent14a34023570a25f926fb1820ad60d0b614fd76e3 (diff)
merge revision(s) 44790: [Backport #9472]
* io.c (rb_io_syswrite): add RB_GC_GUARD [Bug #9472][ruby-core:60407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 5aa720b6a7..6e3fd85d2b 100644
--- a/io.c
+++ b/io.c
@@ -4572,6 +4572,7 @@ rb_io_syswrite(VALUE io, VALUE str)
}
n = rb_write_internal(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
+ RB_GC_GUARD(str);
if (n == -1) rb_sys_fail_path(fptr->pathv);