summaryrefslogtreecommitdiff
path: root/ext/-test-/string/fstring.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-02-22 16:14:11 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-02-23 13:33:46 -0500
commit510404f2def62918849797e742642254700e3608 (patch)
treed9bd54acb14d806d7e982b99b1136617126d1519 /ext/-test-/string/fstring.c
parent01f9b2ae4142f0c0d3d2dec9ea141572265d05b2 (diff)
Stop using rb_fstring publicly
rb_fstring is a private API, so we should use rb_str_to_interned_str instead, which is a public API.
Diffstat (limited to 'ext/-test-/string/fstring.c')
-rw-r--r--ext/-test-/string/fstring.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/-test-/string/fstring.c b/ext/-test-/string/fstring.c
index 7ee14a8570..d3062224d8 100644
--- a/ext/-test-/string/fstring.c
+++ b/ext/-test-/string/fstring.c
@@ -2,12 +2,10 @@
#include "ruby/encoding.h"
#include "internal/string.h"
-VALUE rb_fstring(VALUE str);
-
VALUE
bug_s_fstring(VALUE self, VALUE str)
{
- return rb_fstring(str);
+ return rb_str_to_interned_str(str);
}
VALUE
@@ -15,7 +13,7 @@ bug_s_fstring_fake_str(VALUE self)
{
static const char literal[] = "abcdefghijklmnopqrstuvwxyz";
struct RString fake_str;
- return rb_fstring(rb_setup_fake_str(&fake_str, literal, sizeof(literal) - 1, 0));
+ return rb_str_to_interned_str(rb_setup_fake_str(&fake_str, literal, sizeof(literal) - 1, 0));
}
VALUE