Return fstrings from `build_const_pathname`.

It's possible for `build_const_pathname` to be called when `rb_cString` is
still NULL. There is a fix-up step when `rb_cString` is initialized, but
it only applies to `fstring` instances.
This commit is contained in:
Samuel Williams 2021-09-24 08:17:56 +12:00
Родитель 13b17cb8fc
Коммит 9151ed2fb2
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -202,8 +202,7 @@ build_const_pathname(VALUE head, VALUE tail)
VALUE path = rb_str_dup(head);
rb_str_cat2(path, "::");
rb_str_append(path, tail);
OBJ_FREEZE(path);
return path;
return rb_fstring(path);
}
static VALUE