json 2.7.3 → 2.7.4.rc2

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: 1500b32611dd205778d21f8175a6e587c85d8090e9861c6ab5c2bbdc8cc7b107
4
- data.tar.gz: 7bccf2b0c350f282b152f0e85addedb62d596c83a5347afa4205bb025f1dd24f
3
+ metadata.gz: ece06287b0082ae4ee021f7ac2c889b1ac17705eeb099713c4cc1cb9f81c311f
4
+ data.tar.gz: be8843f180f122ea54b09c1c4cfc6f73a30dae5331e113d6868aa094180ac1f1
5
5
  SHA512:
6
- metadata.gz: cf52a3ae9060dcebbc0febfde70aba86d718dd0545eb55da4f25e7fffa3bacbaff82e56656c189f6d7ffd25093c9a5967085864ce1db921dcb0e9cc92c9b299f
7
- data.tar.gz: 55d5e7da5ff1dee20b3a48e08d7a8e389fe8cd4a1f6569ca84d0a59f0e84085fb5af3e2a6721f76ea7dfd860bdbdc8844e7464572191be0c816bf0522036edd0
6
+ metadata.gz: 8c547bfaddc079ca0d9309861d9fb44f8e447a9a04b538d87e7879aa3160bd9e7728ca800252f4f01e9eec02305d6a3736deab0de0bf3176d873e071ca510c0e
7
+ data.tar.gz: 0f3dd6c721b0cb64154caf51f02bef90955a5377bcf01d44bcc2e8268771fa27186dd8d29485a027128cab386b1e7ab8f243c5c9799befebfbbc98730d2147aa
@@ -963,6 +963,12 @@ static VALUE cState_generate(VALUE self, VALUE obj)
963
963
  return result;
964
964
  }
965
965
 
966
+ static VALUE cState_initialize(int argc, VALUE *argv, VALUE self)
967
+ {
968
+ rb_warn("The json gem extension was loaded with the stdlib ruby code. You should upgrade rubygems with `gem update --system`");
969
+ return self;
970
+ }
971
+
966
972
  /*
967
973
  * call-seq: initialize_copy(orig)
968
974
  *
@@ -1408,6 +1414,9 @@ void Init_generator(void)
1408
1414
  cState = rb_define_class_under(mGenerator, "State", rb_cObject);
1409
1415
  rb_define_alloc_func(cState, cState_s_allocate);
1410
1416
  rb_define_singleton_method(cState, "from_state", cState_from_state_s, 1);
1417
+ rb_define_method(cState, "initialize", cState_initialize, -1);
1418
+ rb_define_alias(cState, "initialize", "initialize"); // avoid method redefinition warnings
1419
+
1411
1420
  rb_define_method(cState, "initialize_copy", cState_init_copy, 1);
1412
1421
  rb_define_method(cState, "indent", cState_indent, 0);
1413
1422
  rb_define_method(cState, "indent=", cState_indent_set, 1);
@@ -1498,4 +1507,6 @@ void Init_generator(void)
1498
1507
  usascii_encindex = rb_usascii_encindex();
1499
1508
  utf8_encindex = rb_utf8_encindex();
1500
1509
  binary_encindex = rb_ascii8bit_encindex();
1510
+
1511
+ rb_require("json/ext/generator/state");
1501
1512
  }
data/lib/json/ext.rb CHANGED
@@ -15,9 +15,6 @@ module JSON
15
15
  else
16
16
  require 'json/ext/parser'
17
17
  require 'json/ext/generator'
18
- unless RUBY_ENGINE == 'jruby'
19
- require 'json/ext/generator/state'
20
- end
21
18
  $DEBUG and warn "Using Ext extension for JSON."
22
19
  JSON.parser = Parser
23
20
  JSON.generator = Generator
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.7.3'
4
+ VERSION = '2.7.4.rc2'
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.7.3
4
+ version: 2.7.4.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a JSON implementation as a Ruby extension in C.
14
14
  email: flori@ping.de
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.5.11
88
+ rubygems_version: 3.5.17
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: JSON Implementation for Ruby