aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-01 20:50:56 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-01 20:50:56 +0000
commit50612854073de9e9dfb204208681f49ff9487b40 (patch)
treef3920c3ee705e9917b973e8b74c464133cf43256
parente7892503254baba0a8a7681fd2e61aac5ce81d5b (diff)
downloadruby-50612854073de9e9dfb204208681f49ff9487b40.tar.gz
io.c (rb_io_syswrite): add RB_GC_GUARD
* io.c (rb_io_syswrite): add RB_GC_GUARD [Bug #9472][ruby-core:60407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 461b907313..bd64e0ea5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 2 05:48:42 2014 Eric Wong <e@80x24.org>
+
+ * io.c (rb_io_syswrite): add RB_GC_GUARD
+ [Bug #9472][ruby-core:60407]
+
Sat Feb 1 15:09:16 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c (ole_typedesc2val): add VT_RECORD case.
diff --git a/io.c b/io.c
index 0020f4704a..1d9f87eb5f 100644
--- a/io.c
+++ b/io.c
@@ -4682,6 +4682,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);