summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index b14f42e1f8..77facacfcf 100644
--- a/file.c
+++ b/file.c
@@ -2618,6 +2618,7 @@ rb_readlink(VALUE path)
) {
rb_str_modify_expand(v, size);
size *= 2;
+ rb_str_set_len(v, size);
}
if (rv < 0) {
rb_str_resize(v, 0);