ffi-yajl 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ffi_yajl/parser.rb +3 -0
- data/lib/ffi_yajl/version.rb +1 -1
- data/spec/ffi_yajl/parser_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106e9a1f39150e1ba6d8c9e8cc89494619cada58
|
4
|
+
data.tar.gz: 2d13687a1f4eb651f4fd18078d2662afd6d9d0d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26a0c758139e7cfe1d36abec9457baef1ddc886a90c054bb637d52d5df51650cb1c633e9e8dacf702761fdc2c804fda5f11c00398a900b0b4e4a0bc46a4b822e
|
7
|
+
data.tar.gz: 7b86b9d4b257be76b21cf1f3c3c59ca3b2dc7ed7f7502be2012961e45b5324d8551ee6368e7d2c2f4d1887dc4dfd4a3380acf8359c28c19b9fd02edeb4195f1c
|
data/lib/ffi_yajl/parser.rb
CHANGED
data/lib/ffi_yajl/version.rb
CHANGED
@@ -6,6 +6,11 @@ describe "FFI_Yajl::Parser" do
|
|
6
6
|
|
7
7
|
let(:parser) { FFI_Yajl::Parser.new }
|
8
8
|
|
9
|
+
it "returns nil for an empty string (compatibility with yajl-ruby)" do
|
10
|
+
json = ''
|
11
|
+
expect( parser.parse(json) ).to be_nil
|
12
|
+
end
|
13
|
+
|
9
14
|
it "throws an exception when trailing braces are missing" do
|
10
15
|
json = '{{"foo": 1234}'
|
11
16
|
expect { parser.parse(json) }.to raise_error(FFI_Yajl::ParseError)
|