oj 3.13.6 → 3.13.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c01eed4e3f068cda64af85aa6fe2aa15d7c559a3d1947385a8122112ae1b80b4
4
- data.tar.gz: caba410a8bfee592344b8cfb281da48932cc2871ee3cc7fe71dadefacb55dc13
3
+ metadata.gz: 44e493d06f06095e80eb1af563739efca81076a8d3cfd89d02e537ada1f00a60
4
+ data.tar.gz: 9502a2285781a49c8a2cec4937bb92c1b04a4c95e44b8f34fdd9a6295f0f69f4
5
5
  SHA512:
6
- metadata.gz: 15dc55ed4572c0dcba2a3345aee97e5ab17f3106eef44c3d0a3c9e258915c1d95cae3bda8bbce6f21d3de08c22662a07ce7e39a52b77ff6c1f660cb576054e1f
7
- data.tar.gz: 768977fae9b1c60baa679e32eb3d66d02206eb4357c2f6c29189b1d2dd27982a59f65648f8ee11424211f4e80a2a4ca11f19b285bee18db1d08ddbaba10fa1ca
6
+ metadata.gz: fa5e096b0ec018cc964c98e108967e766454d48bbfbd7a0ec55fc86aa2e4cac1d54f2b069613823d183df128ed836c95b2b3851793243985b531bbe41b045132
7
+ data.tar.gz: 22a9ded2a0442a64f4ac91e3fc5b1d0be86ea6c53dd857039a92ef515a74b6e348b3587899df5e4a78550ec8e1c4c7c06986a0b8912ef90a419e6c8ac2f65450
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.13.7 - 2021-09-16
4
+
5
+ - The JSON gem allows invalid unicode so Oj, when mimicing JSON now
6
+ allows it as well. Use `:allow_invalid_unicode` to change that.
7
+
3
8
  ## 3.13.6 - 2021-09-11
4
9
 
5
10
  - Fixed unicode UTF 8 parsing in string values.
data/RELEASE_NOTES.md CHANGED
@@ -5,6 +5,12 @@ see the See [{file:CHANGELOG.md}](CHANGELOG.md) file. In this file are
5
5
  the steps to take to aid in keeping things rolling after updating to
6
6
  the latest version.
7
7
 
8
+ ## 3.13.7
9
+
10
+ The default for JSON when mimicked by Oj is now to set
11
+ `:allow_invalid_unicode`. To change that behavior JSON.load, set that
12
+ option to false.
13
+
8
14
  ## 3.13.x
9
15
 
10
16
  This release included a new cache that performs better than the
data/ext/oj/mimic_json.c CHANGED
@@ -516,7 +516,7 @@ static VALUE mimic_parse_core(int argc, VALUE *argv, VALUE self, bool bang) {
516
516
  pi.options = oj_default_options;
517
517
  pi.options.auto_define = No;
518
518
  pi.options.quirks_mode = Yes;
519
- pi.options.allow_invalid = No;
519
+ pi.options.allow_invalid = Yes;
520
520
  pi.options.empty_string = No;
521
521
  pi.options.create_ok = No;
522
522
  pi.options.allow_nan = (bang ? Yes : No);
@@ -573,8 +573,7 @@ static VALUE mimic_parse_core(int argc, VALUE *argv, VALUE self, bool bang) {
573
573
  }
574
574
  }
575
575
  if (oj_hash_has_key(ropts, oj_decimal_class_sym)) {
576
- pi.options.compat_bigdec = (oj_bigdecimal_class ==
577
- rb_hash_lookup(ropts, oj_decimal_class_sym));
576
+ pi.options.compat_bigdec = (oj_bigdecimal_class == rb_hash_lookup(ropts, oj_decimal_class_sym));
578
577
  }
579
578
  v = rb_hash_lookup(ropts, oj_max_nesting_sym);
580
579
  if (Qtrue == v) {
@@ -682,7 +681,7 @@ static VALUE mimic_set_create_id(VALUE self, VALUE id) {
682
681
  */
683
682
  static VALUE mimic_create_id(VALUE self) {
684
683
  if (NULL != oj_default_options.create_id) {
685
- return rb_utf8_str_new(oj_default_options.create_id, oj_default_options.create_id_len);
684
+ return rb_utf8_str_new(oj_default_options.create_id, oj_default_options.create_id_len);
686
685
  }
687
686
  return rb_str_new_cstr(oj_json_class);
688
687
  }
@@ -706,7 +705,7 @@ static struct _options mimic_object_to_json_options = {0, // indent
706
705
  No, // empty_string
707
706
  Yes, // allow_gc
708
707
  Yes, // quirks_mode
709
- No, // allow_invalid
708
+ Yes, // allow_invalid
710
709
  No, // create_ok
711
710
  No, // allow_nan
712
711
  No, // trace
data/lib/oj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.13.6'
4
+ VERSION = '3.13.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.6
4
+ version: 3.13.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-11 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler