1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add NaN / Infinity / MinusInfinity to mark list

This prevents the constants from moving.
This commit is contained in:
Aaron Patterson 2019-05-13 14:27:54 -07:00
parent a1ecf07dff
commit 79ead821dd
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

View file

@ -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");