summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-09-24 08:17:56 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-09-25 18:19:20 +1200
commit9151ed2fb2fa8c0648666cdfdb56e38ec3b15815 (patch)
tree8028c4cb5fa5e31e60347fd9ef8d4e603ac617e4 /variable.c
parent13b17cb8fcdc1d37ac9708b344ac69be61c51681 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4892
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index aa1fdd022e..c6e1012bdd 100644
--- a/variable.c
+++ b/variable.c
@@ -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