diff options
-rw-r--r-- | ext/json/parser/parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index 0bd328ca42..6f0d31c2eb 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -2099,8 +2099,13 @@ void Init_parser(void) rb_define_method(cParser, "source", cParser_source, 0); CNaN = rb_const_get(mJSON, rb_intern("NaN")); + rb_gc_register_mark_object(CNaN); + CInfinity = rb_const_get(mJSON, rb_intern("Infinity")); + rb_gc_register_mark_object(CInfinity); + CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity")); + rb_gc_register_mark_object(CMinusInfinity); i_json_creatable_p = rb_intern("json_creatable?"); i_json_create = rb_intern("json_create"); |