json 2.10.1-java → 2.10.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0934358f40719c30e11b26cc88be54567810756f5d3e1780dcb8df044c0b0edf'
4
- data.tar.gz: 3f25af4cc0426962573ca281fc8b6754bcc42acd31f8f7a632217ef7c62a18f0
3
+ metadata.gz: a839ce5be2a39badc5eb1c512d032dcb9402138151258340d046e8746d14cfc7
4
+ data.tar.gz: 22f933f2b61b194450122fea1f47ff1c4b751bd5bae5a2287671b2ce8e19c918
5
5
  SHA512:
6
- metadata.gz: 852e330449b1818df216c9f75296b7d6355832f7cb05e68bab8fbfb8254b87256ac84741119664c7dc43d28628b7b16ebe92d5b1d71aa478ffc50e56f94b90d3
7
- data.tar.gz: 32924b92e629577a14c7e567330b0752ec98a76568a1f4a010cd277fdf611bbcdb7226bbbcb9ddb919e8f9adac58ba47c25005d14aed57d69fd413ec1fd39f97
6
+ metadata.gz: 1149fd42e204edd71da3d522b1eb566de1e7ae9042818145ebe3c9faa477552172b94c64794c9077acfc5350d594ab847a59a9da4f36090aa265036ad1821b35
7
+ data.tar.gz: 74faa39ea081f6fa952aabfd330f16d29a68be4a6354dcfa6091fa90d98491215502a9bf91bef35a3e2be8d998981ac2e83ea990dd611407ef42971be90ed5d6
data/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changes
2
2
 
3
+ ### 2025-03-12 (2.10.2)
4
+
5
+ * Fix a potential crash in the C extension parser.
6
+ * Raise a ParserError on all incomplete unicode escape sequence. This was the behavior until `2.10.0` unadvertently changed it.
7
+ * Ensure document snippets that are included in parser errors don't include truncated multibyte characters.
8
+
3
9
  ### 2025-02-10 (2.10.1)
4
10
 
5
11
  * Fix a compatibility issue with `MultiJson.dump(obj, pretty: true)`: `no implicit conversion of false into Proc (TypeError)`.
data/lib/json/common.rb CHANGED
@@ -152,10 +152,13 @@ module JSON
152
152
  end
153
153
 
154
154
  def detailed_message(...)
155
+ # Exception#detailed_message doesn't exist until Ruby 3.2
156
+ super_message = defined?(super) ? super : message
157
+
155
158
  if @invalid_object.nil?
156
- super
159
+ super_message
157
160
  else
158
- "#{super}\nInvalid object: #{@invalid_object.inspect}"
161
+ "#{super_message}\nInvalid object: #{@invalid_object.inspect}"
159
162
  end
160
163
  end
161
164
  end
@@ -840,7 +843,7 @@ module JSON
840
843
 
841
844
  opts = JSON.dump_default_options
842
845
  opts = opts.merge(:max_nesting => limit) if limit
843
- opts = merge_dump_options(opts, **kwargs) if kwargs
846
+ opts = opts.merge(kwargs) if kwargs
844
847
 
845
848
  begin
846
849
  State.generate(obj, opts, anIO)
@@ -854,15 +857,6 @@ module JSON
854
857
  string.encode(to, from)
855
858
  end
856
859
 
857
- def merge_dump_options(opts, strict: NOT_SET)
858
- opts = opts.merge(strict: strict) if NOT_SET != strict
859
- opts
860
- end
861
-
862
- class << self
863
- private :merge_dump_options
864
- end
865
-
866
860
  # JSON::Coder holds a parser and generator configuration.
867
861
  #
868
862
  # module MyApp
Binary file
Binary file
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.1'
4
+ VERSION = '2.10.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.1
4
+ version: 2.10.2
5
5
  platform: java
6
6
  authors:
7
7
  - Daniel Luz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-10 00:00:00.000000000 Z
11
+ date: 2025-03-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A JSON implementation as a JRuby extension.
14
14
  email: dev+ruby@mernen.com