diff --git a/ChangeLog b/ChangeLog index e3f6bc36e9..ac7496efa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 29 21:11:15 2010 Masaya Tarui + + * ext/stringio/stringio.c (strio_write): add RB_GC_GUARD. + + Tue Jun 29 19:39:59 2010 Masaki Suketa * test/win32ole/test_win32ole_method.rb (is_ruby64): check diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index a554e7187a..c93ba10466 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1107,6 +1107,7 @@ strio_write(VALUE self, VALUE str) long len, olen; rb_encoding *enc, *enc2; + RB_GC_GUARD(str); if (TYPE(str) != T_STRING) str = rb_obj_as_string(str); enc = rb_enc_get(ptr->string);