summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pack.c b/pack.c
index 2817491b77..294d7dfa35 100644
--- a/pack.c
+++ b/pack.c
@@ -217,6 +217,7 @@ pack_pack(rb_execution_context_t *ec, VALUE ary, VALUE fmt, VALUE buffer)
else {
if (!RB_TYPE_P(buffer, T_STRING))
rb_raise(rb_eTypeError, "buffer must be String, not %s", rb_obj_classname(buffer));
+ rb_str_modify(buffer);
res = buffer;
}