[前][次][番号順一覧][スレッド一覧]

ruby-changes:32711

From: normal <ko1@a...>
Date: Sun, 2 Feb 2014 05:51:02 +0900 (JST)
Subject: [ruby-changes:32711] normal:r44790 (trunk): io.c (rb_io_syswrite): add RB_GC_GUARD

normal	2014-02-02 05:50:56 +0900 (Sun, 02 Feb 2014)

  New Revision: 44790

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44790

  Log:
    io.c (rb_io_syswrite): add RB_GC_GUARD
    
    * io.c (rb_io_syswrite): add RB_GC_GUARD
      [Bug #9472][ruby-core:60407]

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44789)
+++ ChangeLog	(revision 44790)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Feb 2 05:48:42 2014  Eric Wong <e@8...>
+
+	* 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@n...>
 
 	* ext/win32ole/win32ole.c (ole_typedesc2val): add VT_RECORD case.
Index: io.c
===================================================================
--- io.c	(revision 44789)
+++ io.c	(revision 44790)
@@ -4682,6 +4682,7 @@ rb_io_syswrite(VALUE io, VALUE str) https://github.com/ruby/ruby/blob/trunk/io.c#L4682
     }
 
     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);
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]