ffi-yajl 0.1.0-universal-java → 0.1.1-universal-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1af5127a16b987f2de8da3819dd1a98e2384870e
4
- data.tar.gz: 6962689b6508a53174de9c17dfd23b79b0d4163f
3
+ metadata.gz: a357db3a32e45d9bfc7af7f1f6e545666058273f
4
+ data.tar.gz: 4bf9286b6dfa15e6d202118ddda7e91eb78988e2
5
5
  SHA512:
6
- metadata.gz: 738f09fd70f72f5d02fd76f4df92daf454e8d409d2b0a1c833cac6d4e227502739d72d720a59d21e388676800778cd25a948aacfb08c9deabe10c331b4b28d61
7
- data.tar.gz: 4b6bd23a4ac0844e61d5682afa565abcd6961996c9de0e04e1dc461b40ee5f030f5cddb6962bbb79f9804ff3b8947d4d5f554dc4af6e05bb2993b5a9bf23f0a5
6
+ metadata.gz: 603cdebb51b26424c24b6c15d71e667bcd399892a4407999d3cedde03dccccff74cabed0a4ed27c35a9e456b31a248abb17207a673b43a344c0fc554ff14ce66
7
+ data.tar.gz: 28c4f097656b8f464e12401f96eb34fc94a9a210aea6eb0ecbbe836914a38cb040f3711de9eb7b6575d65f1e8d0f07b73c3d68dd3289b5cf867f2bb946bd6198
@@ -16,6 +16,9 @@ module FFI_Yajl
16
16
  # initialization that we can do in pure ruby
17
17
  yajl_opts = {}
18
18
 
19
+ # XXX: bug-compat with ruby-yajl
20
+ return nil if str == ""
21
+
19
22
  # call either the ext or ffi hook
20
23
  do_yajl_parse(str, yajl_opts)
21
24
  end
@@ -1,3 +1,3 @@
1
1
  module FFI_Yajl
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-yajl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: universal-java
6
6
  authors:
7
7
  - Lamont Granquist