summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/transcode.c b/transcode.c
index 2cceecfebc..e6c4f85f83 100644
--- a/transcode.c
+++ b/transcode.c
@@ -3768,11 +3768,8 @@ econv_primitive_convert(int argc, VALUE *argv, VALUE self)
rb_str_modify(output);
if (NIL_P(output_bytesize_v)) {
-#if USE_RVARGC
output_bytesize = rb_str_capacity(output);
-#else
- output_bytesize = RSTRING_EMBED_LEN_MAX;
-#endif
+
if (!NIL_P(input) && output_bytesize < RSTRING_LEN(input))
output_bytesize = RSTRING_LEN(input);
}