summary refs log tree commit
path: root/ext/json/ext/generator/generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/ext/generator/generator.c')
-rw-r--r--ext/json/ext/generator/generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index a75118a..b410eb7 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -351,7 +351,7 @@ static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned long len)
 
 static void fbuffer_append_str(FBuffer *fb, VALUE str)
 {
-    const char *newstr = RSTRING_PTR(str);
+    const char *newstr = StringValuePtr(str);
     unsigned long len = RSTRING_LEN(str);
 
     RB_GC_GUARD(str);