oj 3.10.11 → 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: 47283e200dc64657f1847aede3e919be687893f79283f4c84d04202a7039c27a
4
- data.tar.gz: 7572d238ef551ba6278e0687f322eee9f4c719170076012e553816d8a51ca1a4
3
+ metadata.gz: 753328717dbbc7da3ec83a89d27d7962562fe23258a978e718fe8163cbb1717e
4
+ data.tar.gz: 194b09bf0f6fbf8e46af6185703f6c865c5c0ae50d752da9845244330852a2fa
5
5
  SHA512:
6
- metadata.gz: d30cd67a79dd62acb4f3795993d3b41fd261c3672d1e22b932f4de5e5ff51131b4310be5f8fbd34de5a1259d22c5ea591213e74aedec0d870234da96d3f9bafd
7
- data.tar.gz: 917c44023d012a3020e53f5487409a4d72d3149c3e0e8f47a41580a53f169af740ddc0842f23ac4fcbed85eec33fa87197d913c0f84b1aa0c6a17af29f849bc8
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.11'
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,35 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.11
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-20 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: '1.0'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '3'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.0'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '3'
33
13
  - !ruby/object:Gem::Dependency
34
14
  name: rake-compiler
35
15
  requirement: !ruby/object:Gem::Requirement