summaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-21 07:38:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-21 07:38:51 +0000
commit72b284797a3b2565aeea1efe0e6c0be07df4fbae (patch)
tree3986060a5be7b399d4fc1a834263f1c27c5c8187 /marshal.c
parent99cb8dc38a8624cb248dfc0afcd33ba896080324 (diff)
downloadruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.tar.gz
ruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.tar.xz
ruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.zip
* marshal.c (marshal_dump): use normal object as the buffer so
that no hidden object is exposed to ruby-level. [ruby-dev:39744] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index bcc8352f7..7acc495ca 100644
--- a/marshal.c
+++ b/marshal.c
@@ -925,7 +925,7 @@ marshal_dump(int argc, VALUE *argv)
arg->untrust = FALSE;
arg->compat_tbl = st_init_numtable();
arg->encodings = 0;
- arg->str = rb_str_tmp_new(0);
+ arg->str = rb_str_buf_new(0);
if (!NIL_P(port)) {
if (!rb_respond_to(port, s_write)) {
type_error:
@@ -949,7 +949,6 @@ marshal_dump(int argc, VALUE *argv)
rb_io_write(arg->dest, arg->str);
rb_str_resize(arg->str, 0);
}
- RBASIC(arg->str)->klass = rb_cString;
clear_dump_arg(arg);
RB_GC_GUARD(wrapper);