oj 3.10.9 → 3.10.14

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: 3b5fb7fd1905154e2b5ebd902ec807b12108f7619f59d7c24e47b49e6aaf569f
4
- data.tar.gz: c93ce257ece0931ad32d997670ecbc3960d65c0fb722986c7d13d34c9d486ca6
3
+ metadata.gz: 753328717dbbc7da3ec83a89d27d7962562fe23258a978e718fe8163cbb1717e
4
+ data.tar.gz: 194b09bf0f6fbf8e46af6185703f6c865c5c0ae50d752da9845244330852a2fa
5
5
  SHA512:
6
- metadata.gz: 597ca25a4f92c2c836ee46420f390a6bf4dbbd884deff31148fe03a684603e45b4e6361b928002d1eb16e46c2653b22ede1064ed5f46818cceb44c58440f62f8
7
- data.tar.gz: 5972ca3d493979fee3b2dbd14bbc6a2cbb367175b48ef540fe3dab3e92a76dae28b5d1b366b27115f02d6dbfdfef59698ad251849b1598e457397edb0fbfbdb5
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'
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.10.9'
4
+ VERSION = '3.10.14'
5
5
  end
@@ -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 not uses the
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
- @json = '{"a":2,"b":5.23683071,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},'\
31
- '"g":"\\"\\u0000\\u001f","h":1000.0,"i":0.001}'
32
- #@json = '{"a":2,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},'\
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
@@ -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
- assert_equal('12.12345678901235', "%0.14f" % [f]) # only care about 16 digits
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.9
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-08-17 00:00:00.000000000 Z
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