json 2.10.0 → 2.10.1

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: 24fd6da1cbd6a70e528edd9a58413c13ff660a9bae2df816b85dc13f31e81bfc
4
- data.tar.gz: a58df228819f0e5742cae810d6c94e80d11a4bff6af309e8c0dc3b511c85a47b
3
+ metadata.gz: fc08bd5e3c83c4e731d37e18b5a32f9bf0049d896c483f1beb96af96f2daad18
4
+ data.tar.gz: ff215943fdccc5a5ed3f7390719aa5c43a18664e19f86d94226ff14c154cc354
5
5
  SHA512:
6
- metadata.gz: 74fa1f2a05b69cd507b21d387568a404a7417dbe4838ff632d5a1ecb7cf9ad8ac40f499718b8df9e5d3b338f5e938ad13177b4fa38f9b083532780a3080ed006
7
- data.tar.gz: e31f05d9ad12c09f1433b93080c40df60fc5062c45a23378ae21579d73856cb9bab79e32df34601b9bad0525845bffb43403c450ac41b272e5682fbf6bd63a40
6
+ metadata.gz: e3bc85653be385e76842fa3f69671fccdc4235a32806f554cf8ec4a9ad697996be97d3aef52823b3c1f8839e1cd9a7893ab87360ca76d59b4ff704c75fcb655e
7
+ data.tar.gz: f2f09188afd38972e15e1c80c2c8c4efd14aee954d18ff83d4a6a993bd0f9d9c84362232c17abbc9bf3ffdfce062c79c75a6fccf124bdbd3345a202b76d50a26
data/CHANGES.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Changes
2
2
 
3
+ ### 2025-02-10 (2.10.1)
4
+
5
+ * Fix a compatibility issue with `MultiJson.dump(obj, pretty: true)`: `no implicit conversion of false into Proc (TypeError)`.
6
+
3
7
  ### 2025-02-10 (2.10.0)
4
8
 
5
9
  * `strict: true` now accept symbols as values. Previously they'd only be accepted as hash keys.
6
10
  * The C extension Parser has been entirely reimplemented from scratch.
7
11
  * Introduced `JSON::Coder` as a new API allowing to customize how non native types are serialized in a non-global way.
12
+ * Introduced `JSON::Fragment` to allow assembling cached fragments in a safe way.
8
13
  * The Java implementation of the generator received many optimizations.
9
14
 
10
15
  ### 2024-12-18 (2.9.1)
@@ -1626,7 +1626,7 @@ static int configure_state_i(VALUE key, VALUE val, VALUE _arg)
1626
1626
  else if (key == sym_script_safe) { state->script_safe = RTEST(val); }
1627
1627
  else if (key == sym_escape_slash) { state->script_safe = RTEST(val); }
1628
1628
  else if (key == sym_strict) { state->strict = RTEST(val); }
1629
- else if (key == sym_as_json) { state->as_json = rb_convert_type(val, T_DATA, "Proc", "to_proc"); }
1629
+ else if (key == sym_as_json) { state->as_json = RTEST(val) ? rb_convert_type(val, T_DATA, "Proc", "to_proc") : Qfalse; }
1630
1630
  return ST_CONTINUE;
1631
1631
  }
1632
1632
 
@@ -258,7 +258,7 @@ module JSON
258
258
  @object_nl = opts[:object_nl] || '' if opts.key?(:object_nl)
259
259
  @array_nl = opts[:array_nl] || '' if opts.key?(:array_nl)
260
260
  @allow_nan = !!opts[:allow_nan] if opts.key?(:allow_nan)
261
- @as_json = opts[:as_json].to_proc if opts.key?(:as_json)
261
+ @as_json = opts[:as_json].to_proc if opts[:as_json]
262
262
  @ascii_only = opts[:ascii_only] if opts.key?(:ascii_only)
263
263
  @depth = opts[:depth] || 0
264
264
  @buffer_initial_length ||= opts[:buffer_initial_length]
data/lib/json/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSON
4
- VERSION = '2.10.0'
4
+ VERSION = '2.10.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank