oj 3.13.20 → 3.13.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/oj/saj2.c +1 -1
- data/lib/oj/version.rb +1 -1
- data/pages/Compatibility.md +1 -1
- data/test/test_parser_saj.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca812104ece12895a17969eea5c870837070875b8c59917220adea228f24cab2
|
4
|
+
data.tar.gz: c46bd5d0d161b9e8e0337daf5af42f9fcc37ec41401a2d9fb3c5416e2ce2fccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 860134683a2d535fc9dfd17eb6ad369855ede35c0474dd386d9a8a3fb80e1a5d9cf2133d04c6ebea84d65ad127b62a2e83adf4f5166db8cbdf0dadf50f9d3984
|
7
|
+
data.tar.gz: cac281da136cf4a336245105eb847ec369e36b09ec8f48e80e3e48bacd0aacc6052d88b1cdca3a912f82f329444fa6c74e02e3ee5f9c56b6002afafbd65611ca
|
data/CHANGELOG.md
CHANGED
data/ext/oj/saj2.c
CHANGED
@@ -315,7 +315,7 @@ static void add_big_key(ojParser p) {
|
|
315
315
|
}
|
316
316
|
|
317
317
|
static void add_big_key_loc(ojParser p) {
|
318
|
-
rb_funcall((
|
318
|
+
rb_funcall(((Delegate)p->ctx)->handler,
|
319
319
|
oj_add_value_id,
|
320
320
|
4,
|
321
321
|
rb_funcall(rb_cObject, oj_bigdecimal_id, 1, rb_str_new(buf_str(&p->buf), buf_len(&p->buf))),
|
data/lib/oj/version.rb
CHANGED
data/pages/Compatibility.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
**Ruby**
|
4
4
|
|
5
|
-
Oj is compatible with Ruby 2.
|
5
|
+
Oj is compatible with Ruby 2.4+ and RBX.
|
6
6
|
Support for JRuby has been removed as JRuby no longer supports C extensions and
|
7
7
|
there are bugs in the older versions that are not being fixed.
|
8
8
|
|
data/test/test_parser_saj.rb
CHANGED
@@ -160,6 +160,32 @@ class SajTest < Minitest::Test
|
|
160
160
|
assert_equal(-118999, (handler.calls[0][1] * 10000).to_i)
|
161
161
|
end
|
162
162
|
|
163
|
+
def test_bignum_loc
|
164
|
+
handler = LocSaj.new()
|
165
|
+
json = <<~JSON
|
166
|
+
{
|
167
|
+
"width": 192.33800000000002,
|
168
|
+
"xaxis": {
|
169
|
+
"anchor": "y"
|
170
|
+
}
|
171
|
+
}
|
172
|
+
JSON
|
173
|
+
|
174
|
+
p = Oj::Parser.new(:saj)
|
175
|
+
p.handler = handler
|
176
|
+
p.parse(json)
|
177
|
+
assert_equal(6, handler.calls.size)
|
178
|
+
assert_equal(1_923_380, (handler.calls[1][1] * 10000).to_i)
|
179
|
+
handler.calls[1][1] = 1_923_380
|
180
|
+
assert_equal([[:hash_start, nil, 1, 1],
|
181
|
+
[:add_value, 1923380, 'width', 2, 30],
|
182
|
+
[:hash_start, 'xaxis', 3, 12],
|
183
|
+
[:add_value, 'y', 'anchor', 4, 17],
|
184
|
+
[:hash_end, 'xaxis', 5, 3],
|
185
|
+
[:hash_end, nil, 6, 1]],
|
186
|
+
handler.calls)
|
187
|
+
end
|
188
|
+
|
163
189
|
def test_array_empty
|
164
190
|
handler = AllSaj.new()
|
165
191
|
json = %{[]}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.13.
|
4
|
+
version: 3.13.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|