rapidjson 0.3.0 → 0.4.0

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: f6e0fb853f22254885b3a5e40c0b615992bbe77c7cde00d6cf5c3f9bdd8fa3c7
4
- data.tar.gz: 0e94b7913c864277937c7b1024fd2e6d99a3730598112eba16e86ff5fc286b6d
3
+ metadata.gz: 66b8d422b4ba65041b7eae2691bcc909200f5de6bc10e4f5666fd5af4cc3eb96
4
+ data.tar.gz: 777b97d64191635565e01998b74b505493615d1afe5dd0803ce89ac2f1093451
5
5
  SHA512:
6
- metadata.gz: 524f57ff6a71f07de04c173f84ed7465d8b5f97450afda4a5e0f6c21ba29e44d41a8aa0958d675b38b6daa2bca7fd0017c99eabda4c77c72cd63ebbc21309e38
7
- data.tar.gz: f9d5f408ffaeb533e2e8c0d3eb156bd2493f2928dc2aa4dee07e9e1ca0053ec4f6df5a5c7f57ed2b335fa9fc2f14f24efc2265d4700cc76614c53bf66917c555
6
+ metadata.gz: bc7821fd5c479fcb6f4609b935fd52c27542a89cde1e0242a794a247b8d4f6ba391f893ffbc75ad6e3d973f5d4149cea92d85e2543386e145b6bfb5f48092bbd
7
+ data.tar.gz: 98f5655e8863c56f103a1793b5517174dcd62064deccdbf86304fee89c08fa494e76c6f0fd1f367db54448bc68d27d3a21b4fb6034ffec99e8ad2a4c7a9e619d
@@ -122,7 +122,12 @@ class RubyObjectEncoder {
122
122
  }
123
123
  }
124
124
  } else {
125
- writer.Double(f);
125
+ // TODO: We should avoid relying on to_s and do this conversion
126
+ // ourselves. However it's difficult to get the exact same rounding
127
+ // and truncation that Ruby uses.
128
+ VALUE str = rb_funcall(v, rb_intern("to_s"), 0);
129
+ Check_Type(str, T_STRING);
130
+ encode_raw_json_str(str);
126
131
  }
127
132
  }
128
133
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RapidJSON
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapidjson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Fast JSON encoder/decoder based using RapidJSON
14
14
  email:
@@ -78,7 +78,7 @@ metadata:
78
78
  homepage_uri: https://github.com/jhawthorn/rapidjson-ruby
79
79
  source_code_uri: https://github.com/jhawthorn/rapidjson-ruby
80
80
  changelog_uri: https://github.com/jhawthorn/rapidjson-ruby
81
- post_install_message:
81
+ post_install_message:
82
82
  rdoc_options: []
83
83
  require_paths:
84
84
  - lib
@@ -93,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.5.11
97
- signing_key:
96
+ rubygems_version: 3.5.16
97
+ signing_key:
98
98
  specification_version: 4
99
99
  summary: Fast JSON encoder/decoder based using RapidJSON
100
100
  test_files: []