Index: src/io/api.c =================================================================== --- src/io/api.c (revision 39199) +++ src/io/api.c (working copy) @@ -319,6 +319,16 @@ if (PMC_IS_NULL(pmc)) return -1; + /* There is a GC issue with using the fake STRING. + * However, it would be a performance drain to use Parrot_str_new for each call. + * For now, optimize for "\n", which will remove the GC issue during the execution + * of `say 'constant'`. + */ + if (length == 1 && ((const char *)buffer)[0] == '\n') { + result = Parrot_io_putps(interp, pmc, CONST_STRING(interp, "\n")); + return result; + } + fake.strstart = (char *) PARROT_const_cast(void *, buffer); fake.strlen = fake.bufused = length; fake.charset = Parrot_default_charset_ptr;