summaryrefslogtreecommitdiff
path: root/ext/json/generator/generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/generator/generator.h')
-rw-r--r--ext/json/generator/generator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index 3220178a8f7..4958cf094d4 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -105,6 +105,7 @@ typedef struct JSON_Generator_StateStruct {
Data_Get_Struct(Vstate, JSON_Generator_State, state); \
buffer = cState_prepare_buffer(Vstate); \
generate_json_##type(buffer, Vstate, state, self); \
+ RB_GC_GUARD(Vstate); \
return fbuffer_to_s(buffer)
static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self);