ext/oj/mimic_json.c in oj-3.3.6 vs ext/oj/mimic_json.c in oj-3.3.7
- old
+ new
@@ -315,11 +315,11 @@
static VALUE
mimic_load(int argc, VALUE *argv, VALUE self) {
VALUE obj;
VALUE p = Qnil;
- obj = oj_compat_parse(argc, argv, self);
+ obj = oj_compat_load(argc, argv, self);
if (2 <= argc) {
if (rb_cProc == rb_obj_class(argv[1])) {
p = argv[1];
} else if (3 <= argc) {
if (rb_cProc == rb_obj_class(argv[2])) {
@@ -489,11 +489,11 @@
VALUE args[1];
rb_scan_args(argc, argv, "11", NULL, &ropts);
parse_info_init(&pi);
oj_set_compat_callbacks(&pi);
- // TBD
+
pi.err_class = oj_json_parser_error_class;
//pi.err_class = Qnil;
pi.options = oj_default_options;
pi.options.auto_define = No;
@@ -676,11 +676,11 @@
FloatDec, // bigdec_load
No, // to_hash
No, // to_json
No, // as_json
No, // nilnil
- Yes, // empty_string
+ No, // empty_string
Yes, // allow_gc
Yes, // quirks_mode
No, // allow_invalid
No, // create_ok
No, // allow_nan
@@ -793,9 +793,10 @@
if (rb_const_defined_at(json, rb_intern("ParserError"))) {
oj_json_parser_error_class = rb_const_get(json, rb_intern("ParserError"));
} else {
oj_json_parser_error_class = rb_define_class_under(json, "ParserError", json_error);
}
+ printf("*** setting parse error to %lx %s\n", oj_json_parser_error_class, rb_class2name(oj_json_parser_error_class));
if (rb_const_defined_at(json, rb_intern("GeneratorError"))) {
oj_json_generator_error_class = rb_const_get(json, rb_intern("GeneratorError"));
} else {
oj_json_generator_error_class = rb_define_class_under(json, "GeneratorError", json_error);
}