oj 3.10.9 → 3.10.14
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 +4 -4
- data/lib/oj.rb +0 -8
- data/lib/oj/version.rb +1 -1
- data/test/json_gem/json_common_interface_test.rb +6 -7
- data/test/test_custom.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 753328717dbbc7da3ec83a89d27d7962562fe23258a978e718fe8163cbb1717e
|
4
|
+
data.tar.gz: 194b09bf0f6fbf8e46af6185703f6c865c5c0ae50d752da9845244330852a2fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ca2519a11dabf4c00b2c7173eb1ba27dc9d058d24437af428751094536ebb1197965eb7507d9e0319ad79f5c3dacb0d1035d15fa74aca66ef0b613a0e905e6d
|
7
|
+
data.tar.gz: f37dba610878360bb442f004953d1d55d8ddabbde5d17b11c4c2fdf08023b2bbc57577a0aef2c49c1bfef36d10d2c855f1754c4003206ced0699ba0a8173b168
|
data/lib/oj.rb
CHANGED
@@ -2,14 +2,6 @@
|
|
2
2
|
module Oj
|
3
3
|
end
|
4
4
|
|
5
|
-
begin
|
6
|
-
# This require exists to get around Rubinius failing to load bigdecimal from
|
7
|
-
# the C extension.
|
8
|
-
require 'bigdecimal'
|
9
|
-
rescue Exception
|
10
|
-
# ignore
|
11
|
-
end
|
12
|
-
|
13
5
|
require 'oj/version'
|
14
6
|
require 'oj/bag'
|
15
7
|
require 'oj/easy_hash'
|
data/lib/oj/version.rb
CHANGED
@@ -15,7 +15,7 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase
|
|
15
15
|
def setup
|
16
16
|
@hash = {
|
17
17
|
'a' => 2,
|
18
|
-
'b' => 5.23683071,
|
18
|
+
#'b' => 5.23683071,
|
19
19
|
'c' => 'c',
|
20
20
|
'd' => [ 1, "b", 3.14 ],
|
21
21
|
'e' => { 'foo' => 'bar' },
|
@@ -23,14 +23,13 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase
|
|
23
23
|
'h' => 1000.0,
|
24
24
|
'i' => 0.001
|
25
25
|
}
|
26
|
-
# Tired of chasing floating point rounding and precision. Oj
|
26
|
+
# Tired of chasing floating point rounding and precision. Oj now uses the
|
27
27
|
# Ruby float parser in compat mode yet on i386 machines there are issues
|
28
28
|
# with this test when the float is included.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
#p '"g":"\\"\\u0000\\u001f","h":1000.0,"i":0.001}'
|
29
|
+
#@json = '{"a":2,"b":5.23683071,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},'\
|
30
|
+
#'"g":"\\"\\u0000\\u001f","h":1000.0,"i":0.001}'
|
31
|
+
@json = '{"a":2,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},'\
|
32
|
+
'"g":"\\"\\u0000\\u001f","h":1000.0,"i":0.001}'
|
34
33
|
end
|
35
34
|
|
36
35
|
def test_index
|
data/test/test_custom.rb
CHANGED
@@ -126,7 +126,7 @@ class CustomJuice < Minitest::Test
|
|
126
126
|
def test_float_parse_fast
|
127
127
|
f = Oj.load("12.123456789012345678", mode: :custom, bigdecimal_load: :fast);
|
128
128
|
assert_equal(Float, f.class)
|
129
|
-
|
129
|
+
assert(12.12345678901234 <= f && f < 12.12345678901236)
|
130
130
|
end
|
131
131
|
|
132
132
|
def test_nan_dump
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bigdecimal
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '2.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rake-compiler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|