oj 2.14.3 → 2.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/ext/oj/parse.c +1 -0
- data/lib/oj/version.rb +1 -1
- data/test/test_various.rb +32 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e24cfa368da8658a1a0d7a327081d3dcf54eb2b1
|
4
|
+
data.tar.gz: c54d265f263e0e5ff7fe5694b7318b6ec25dc594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb94917cf00f55f316fa6679ff46f01a7bbfc8fb8e6c162db4c28fb35bf9c102f8ed37360672b2a5ca5b07f61b0e33bb3419f0a4736bef09ed3455a89fe5a8d5
|
7
|
+
data.tar.gz: 49dee1f8813f27c8b846b1a81c2e4ac0ca97579f3a2ccd1bc1175f3ed6eb51684d304dc76137c12266ba884cc316a47a909b509ee1d01d0c892410ae7cad339c
|
data/README.md
CHANGED
@@ -159,9 +159,9 @@ Oj.default_options = {:mode => :compat }
|
|
159
159
|
|
160
160
|
## Releases
|
161
161
|
|
162
|
-
**Release 2.14.
|
162
|
+
**Release 2.14.4**
|
163
163
|
|
164
|
-
-
|
164
|
+
- When not in quirks mode strings are now raise an exception if they are the top level JSON value.
|
165
165
|
|
166
166
|
[Older release notes](http://www.ohler.com/dev/oj_misc/release_notes.html).
|
167
167
|
|
@@ -248,3 +248,5 @@ Follow [@peterohler on Twitter](http://twitter.com/#!/peterohler) for announceme
|
|
248
248
|
[Need for Speed](http://www.ohler.com/dev/need_for_speed/need_for_speed.html) for an overview of how Oj::Doc was designed.
|
249
249
|
|
250
250
|
*OjC, a C JSON parser*: https://www.ohler.com/ojc also at https://github.com/ohler55/ojc
|
251
|
+
|
252
|
+
*Piper Push Cache, push JSON to browsers*: http://www.piperpushcache.com
|
data/ext/oj/parse.c
CHANGED
data/lib/oj/version.rb
CHANGED
data/test/test_various.rb
CHANGED
@@ -1250,9 +1250,39 @@ class Juice < Minitest::Test
|
|
1250
1250
|
assert_equal(nil, obj)
|
1251
1251
|
end
|
1252
1252
|
|
1253
|
-
def
|
1253
|
+
def test_quirks_null_mode
|
1254
1254
|
assert_raises(Oj::ParseError) { Oj.load("null", :quirks_mode => false) }
|
1255
|
-
assert_equal
|
1255
|
+
assert_equal(nil, Oj.load("null", :quirks_mode => true))
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
def test_quirks_bool_mode
|
1259
|
+
assert_raises(Oj::ParseError) { Oj.load("true", :quirks_mode => false) }
|
1260
|
+
assert_equal(true, Oj.load("true", :quirks_mode => true))
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
def test_quirks_number_mode
|
1264
|
+
assert_raises(Oj::ParseError) { Oj.load("123", :quirks_mode => false) }
|
1265
|
+
assert_equal(123, Oj.load("123", :quirks_mode => true))
|
1266
|
+
end
|
1267
|
+
|
1268
|
+
def test_quirks_decimal_mode
|
1269
|
+
assert_raises(Oj::ParseError) { Oj.load("123.45", :quirks_mode => false) }
|
1270
|
+
assert_equal(123.45, Oj.load("123.45", :quirks_mode => true))
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
def test_quirks_string_mode
|
1274
|
+
assert_raises(Oj::ParseError) { Oj.load('"string"', :quirks_mode => false) }
|
1275
|
+
assert_equal('string', Oj.load('"string"', :quirks_mode => true))
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
def test_quirks_array_mode
|
1279
|
+
assert_equal([], Oj.load("[]", :quirks_mode => false))
|
1280
|
+
assert_equal([], Oj.load("[]", :quirks_mode => true))
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
def test_quirks_object_mode
|
1284
|
+
assert_equal({}, Oj.load("{}", :quirks_mode => false))
|
1285
|
+
assert_equal({}, Oj.load("{}", :quirks_mode => true))
|
1256
1286
|
end
|
1257
1287
|
|
1258
1288
|
def dump_and_load(obj, trace=false)
|
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: 2.14.
|
4
|
+
version: 2.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|