ruby-changes:58122
From: Yusuke <ko1@a...>
Date: Sat, 5 Oct 2019 06:34:59 +0900 (JST)
Subject: [ruby-changes:58122] 076d3d758b (master): ext/json/parser/parser.rl: Update the source code of parser.c
https://git.ruby-lang.org/ruby.git/commit/?id=076d3d758b From 076d3d758b0df47d3dceb3ba0930486f3dd0cc2d Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 5 Oct 2019 06:30:27 +0900 Subject: ext/json/parser/parser.rl: Update the source code of parser.c There have been some direct changes in parser.c which is automatically generated from parser.rl. This updates parser.rl to sync the changes: * 91793b8967e0531bd1159a8ff0cc7e50739c7620 * 79ead821dd4880725c9c6bb9645b3fad71715c5b * 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl index d4e7a60..b33860c 100644 --- a/ext/json/parser/parser.rl +++ b/ext/json/parser/parser.rl @@ -730,7 +730,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/json/parser/parser.rl#L730 } else { json->max_nesting = 100; json->allow_nan = 0; - json->create_additions = 1; + json->create_additions = 0; json->create_id = rb_funcall(mJSON, i_create_id, 0); json->object_class = Qnil; json->array_class = Qnil; @@ -851,14 +851,21 @@ void Init_parser(void) https://github.com/ruby/ruby/blob/trunk/ext/json/parser/parser.rl#L851 cParser = rb_define_class_under(mExt, "Parser", rb_cObject); eParserError = rb_path2class("JSON::ParserError"); eNestingError = rb_path2class("JSON::NestingError"); + rb_gc_register_mark_object(eParserError); + rb_gc_register_mark_object(eNestingError); rb_define_alloc_func(cParser, cJSON_parser_s_allocate); rb_define_method(cParser, "initialize", cParser_initialize, -1); rb_define_method(cParser, "parse", cParser_parse, 0); 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"); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/