ext/json/ext/parser/parser.rl in json_pure-1.5.4 vs ext/json/ext/parser/parser.rl in json_pure-1.5.5

- old
+ new

@@ -600,10 +600,13 @@ * * *create_additions*: If set to false, the Parser doesn't create * additions even if a matchin class and create_id was found. This option * defaults to true. * * *object_class*: Defaults to Hash * * *array_class*: Defaults to Array + * * *quirks_mode*: Enables quirks_mode for parser, that is for example + * parsing single JSON values instead of documents is possible. + * */ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) { VALUE source, opts; GET_PARSER_INIT; @@ -650,10 +653,10 @@ } tmp = ID2SYM(i_create_additions); if (option_given_p(opts, tmp)) { json->create_additions = RTEST(rb_hash_aref(opts, tmp)); } else { - json->create_additions = 1; + json->create_additions = 0; } tmp = ID2SYM(i_create_id); if (option_given_p(opts, tmp)) { json->create_id = rb_hash_aref(opts, tmp); } else {