ffi-radix_tree 0.4.0 → 0.5.0

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
- SHA1:
3
- metadata.gz: f0887fcf903c2f7aea11bd2e20bb735eee55e64a
4
- data.tar.gz: b114742ee1c47b730bbb40b93d940cbe42fe5d5d
2
+ SHA256:
3
+ metadata.gz: 273613cad863a6795457a41a30cac700b0f1a1a0be3e53359ab6dff4c405cc00
4
+ data.tar.gz: 3533ae343c7fbf6d4a5cee15ad33f69bd7c63f0df3a1e239d684a9605215268d
5
5
  SHA512:
6
- metadata.gz: 376ae7c81530f085a3bd71b3ffb3b6f96adabf2761808e1e92382f14493f1a42bb7d2a4ebd553a1f1860c0312d7d9ede73ca0a8f1b271a6dd18c7b26c0602eaa
7
- data.tar.gz: 3140d4d7ddac198b0a2bc05b6dee0a5ce75efb03df56fd039e2be24e8398b5bef677933ab31363c76344390d2588993b6f38afb80e61f25beede32aa84e8ea1e
6
+ metadata.gz: 3b1cfcf6c1121b84d4b0f51f76dff086e76e854ca2de8eb9d4c3d70446566c4524572194f5490d7c8625e60e61701ce02383d168d47462732f4aee423685789d
7
+ data.tar.gz: f1c75e06b8af34d66d463c3b2702854ce711a08ae33eb4e6d69d58d72954e01d2e7777b80bcdd1f95d6bdf40fedafb4f11f7fbea1d39df1af0ee25354f7fc2a2
data/README.md CHANGED
@@ -56,9 +56,6 @@ rtree.greedy_match("managerial") # returns ["noun", "plural nou
56
56
 
57
57
  # Find all values whose keys are included _anywhere_ in the search term
58
58
  rtree.greedy_substring_match("I managed to jump") # returns ["base verb", "past tense"]
59
-
60
- # cleanup
61
- rtree.destroy!
62
59
  ```
63
60
 
64
61
  ## Development
@@ -88,20 +88,11 @@ module FFI
88
88
  attach_function :has_key, [:pointer, :string], :bool
89
89
 
90
90
  class Tree
91
- def self.destroy!(tree)
92
- tree.destroy! unless tree.nil?
93
- end
94
-
95
91
  def initialize
96
- @ptr = ::FFI::RadixTree.create
92
+ @ptr = ::FFI::AutoPointer.new(::FFI::RadixTree.create, ::FFI::RadixTree.method(:destroy))
97
93
  @first_character_present = {}
98
94
  end
99
95
 
100
- def destroy!
101
- ::FFI::RadixTree.destroy(@ptr) unless @ptr.nil?
102
- @ptr = nil
103
- end
104
-
105
96
  def has_key?(key)
106
97
  ::FFI::RadixTree.has_key(@ptr, key)
107
98
  end
@@ -1,5 +1,5 @@
1
1
  module FFI
2
2
  module RadixTree
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-radix_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2021-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -167,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.6.13
170
+ rubygems_version: 3.0.3
172
171
  signing_key:
173
172
  specification_version: 4
174
173
  summary: radix tree implementation in c++ with FFI bindings