json 2.8.1-java → 2.8.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: 22cd415f4f4cf98d59f767f269ab163b88c015719cd974a55bdfc83f087170b9
4
- data.tar.gz: 545b0d5a6ca3873e6db17b9854c425e96f59719c050a39a749a7bd99f4109f8e
3
+ metadata.gz: 28898f308c713d260d14f7b9d421293a42d60320d98a93f6eeab1443d2d18235
4
+ data.tar.gz: 454da1d5c0189afab32a73d7eb16fe9128e941da9cb6f60e9176f3e050944486
5
5
  SHA512:
6
- metadata.gz: 432356f2ce4c10efd568c7fa09596f318f70ce942cd66dfeaaf6469b3f8ad58a2cf751b2d0d9b8bef3e662335142e4ec9b9cd4172338021fb7d8a6d3585b94af
7
- data.tar.gz: 329ef4f74d36e80bd5339532a22175b44c2f2eaeb25c902e7ce5c6da3f4b1c1daf7fee2446105d2f89f35dc41450f9dd3bdcfb9562fb83a7a406d98c33a2ea72
6
+ metadata.gz: ca063a70ff5e7be730c95ebc737618058371c8564b29c258b59cf5b928e89b192619388916bad1224b5e1b778129d737fa3e26cd0a0fc2ca075329532df9d759
7
+ data.tar.gz: ae6931250e30523cefcc4be21d8881169bf7850f78859c320ff153ec4c798b71e3a729ac63dd6e6c6b06c7c1a2cdafaf5e79c276fa5894b95e6e1436e76c15ca
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ### 2024-11-14 (2.8.2)
4
+
5
+ * `JSON.load_file` explictly read the file as UTF-8.
6
+
3
7
  ### 2024-11-06 (2.8.1)
4
8
 
5
9
  * Fix the java packages to include the extension.
data/lib/json/common.rb CHANGED
@@ -1,4 +1,5 @@
1
- #frozen_string_literal: true
1
+ # frozen_string_literal: true
2
+
2
3
  require 'json/version'
3
4
 
4
5
  module JSON
@@ -25,7 +26,7 @@ module JSON
25
26
  elsif object.respond_to?(:to_str)
26
27
  str = object.to_str
27
28
  if str.is_a?(String)
28
- return JSON.parse(object.to_str, opts)
29
+ return JSON.parse(str, opts)
29
30
  end
30
31
  end
31
32
 
@@ -230,8 +231,8 @@ module JSON
230
231
  # parse(File.read(path), opts)
231
232
  #
232
233
  # See method #parse.
233
- def load_file(filespec, opts = {})
234
- parse(File.read(filespec), opts)
234
+ def load_file(filespec, opts = nil)
235
+ parse(File.read(filespec, encoding: Encoding::UTF_8), opts)
235
236
  end
236
237
 
237
238
  # :call-seq:
@@ -242,7 +243,7 @@ module JSON
242
243
  #
243
244
  # See method #parse!
244
245
  def load_file!(filespec, opts = {})
245
- parse!(File.read(filespec), opts)
246
+ parse!(File.read(filespec, encoding: Encoding::UTF_8), opts)
246
247
  end
247
248
 
248
249
  # :call-seq:
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.8.1'
4
+ VERSION = '2.8.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.8.1
4
+ version: 2.8.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: 2024-11-06 00:00:00.000000000 Z
11
+ date: 2024-11-14 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