summaryrefslogtreecommitdiff
path: root/ext/stringio
diff options
context:
space:
mode:
authortarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-29 12:12:07 +0000
committertarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-29 12:12:07 +0000
commit952b1bf355b8fb4f8d05dfef18eb12236c5dc02d (patch)
tree4d0d2eaf66ed56310880ed2a5c6c3cb5f72dd426 /ext/stringio
parent835da2f07b41655296a1a73d56bf3c97d3c6275f (diff)
* ext/stringio/stringio.c (strio_write): add RB_GC_GUARD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r--ext/stringio/stringio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index a554e71..c93ba10 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);