json 2.7.1-java → 2.7.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: 5c8abe9eb109a159a918a75e1e95533799599b7b28579092594277a6007590af
4
- data.tar.gz: 6809193883d286d44ff806dfc6ea0f2860aa344b27507990b1ad9b56d896fbae
3
+ metadata.gz: '0297e625e262e4e540edbe6b50f6c6f9463149c31bbeffd8815372d973985ddb'
4
+ data.tar.gz: 8f63fd93dd6574a60cc2debd2172fe61e8acbf76c7a3b955a09362caff8eaca2
5
5
  SHA512:
6
- metadata.gz: da58227d1e990bee77f0977654dba53f61ebb4e2fec1e5c935d63b237f11cefb91245e903f2545fc85975f37d0643efedb7cee72c262c0c1970e8151b160540f
7
- data.tar.gz: af7e9e69d582961724abda3b235bc863f8d48718e7606004d28ee61500a462ce186e027c7dd670918fef3ec039edc60932f9c0cb20c5356494edfec12bd97f0c
6
+ metadata.gz: 3ee412792d92371db5ee0b521bd1076e1e45bcc06c8f92ad23c46cc5919c849209e24d29f3056e4d052f8a3a9dc5eb4479549ad5c46481e1d9bb43208d768380
7
+ data.tar.gz: fa594f7d4346e79e64263b04d1bb1a4c2e46e7ad28cdd27159870887ea5fbbc09843abe5758a777b154639fa56a1dd69c0b309cd46a9aba904fec725ab1c3e46
@@ -2,7 +2,10 @@
2
2
  unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
3
3
  require 'json'
4
4
  end
5
- require 'ostruct'
5
+ begin
6
+ require 'ostruct'
7
+ rescue LoadError
8
+ end
6
9
 
7
10
  class OpenStruct
8
11
 
@@ -48,4 +51,4 @@ class OpenStruct
48
51
  def to_json(*args)
49
52
  as_json.to_json(*args)
50
53
  end
51
- end
54
+ end if defined?(::OpenStruct)
data/lib/json/common.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  #frozen_string_literal: false
2
2
  require 'json/version'
3
- require 'json/generic_object'
4
3
 
5
4
  module JSON
5
+ autoload :GenericObject, 'json/generic_object'
6
+
6
7
  NOT_SET = Object.new.freeze
7
8
  private_constant :NOT_SET
8
9
 
Binary file
Binary file
@@ -1,5 +1,9 @@
1
1
  #frozen_string_literal: false
2
- require 'ostruct'
2
+ begin
3
+ require 'ostruct'
4
+ rescue LoadError
5
+ warn "JSON::GenericObject requires 'ostruct'. Please install it with `gem install ostruct`."
6
+ end
3
7
 
4
8
  module JSON
5
9
  class GenericObject < OpenStruct
@@ -67,5 +71,5 @@ module JSON
67
71
  def to_json(*a)
68
72
  as_json.to_json(*a)
69
73
  end
70
- end
74
+ end if defined?(::OpenStruct)
71
75
  end
data/lib/json/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
  module JSON
3
3
  # JSON version
4
- VERSION = '2.7.1'
4
+ VERSION = '2.7.2'
5
5
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
6
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
7
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
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.7.1
4
+ version: 2.7.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: 2023-12-05 00:00:00.000000000 Z
11
+ date: 2024-04-04 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