aho_corasick_matcher 1.0.1 → 1.0.2

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
2
  SHA1:
3
- metadata.gz: 22835eda3c317e6993083b400e28fd83c926ff33
4
- data.tar.gz: e4cd6c29e23087dce59d4eb3989f1e9fcdeeb09a
3
+ metadata.gz: 04a302a00edf6cdbf600bd736affae7b8008261e
4
+ data.tar.gz: 731478e4b330885cccdcdae4cda90cc3c2cd8930
5
5
  SHA512:
6
- metadata.gz: bbd1e3bcf0709c2e55bd731d4fec5d8928773bd7b0d3b8fa45601f96d056970e1470386de8c85b687ea3572142814c2440752cc1fa4c1f956980e946ba2c79f0
7
- data.tar.gz: de17ee446c5dff842e1eb299950eeae7e1200396e137df97b1a0b54d05e894173335074e6f26f960af4f2e11193034db652e9dd0c4ab7262c7003b06339ac2a7
6
+ metadata.gz: 502d463348364a262c4f0628faa5607175162a91675ed316c660e96daad7f8c85152dc73cc22676fcf56769c6b3b3eeec62510880e506ac4234518da198a9aa7
7
+ data.tar.gz: b5ee40192e1d4eb11ef7ec5ae1997037b3bad5039c3b1f7ad25ac06756573275e97c469394969c58b2f1e91c4b346e1c34b208a12a298e455edc1d5e5533d227
data/README.md CHANGED
@@ -10,7 +10,7 @@ increases only linearly.
10
10
  It's quite memory-intensive, and building a matcher is expensive – but once it's
11
11
  been built, matching terms is very fast.
12
12
 
13
- **Current version:** 1.0.1
13
+ **Current version:** 1.0.2
14
14
  **Supported Ruby versions:** 1.8.7, 1.9.2, 1.9.3, 2.0, 2.1, 2.2, jruby-1.7, rbx-2.5
15
15
 
16
16
  ## Usage
@@ -33,6 +33,6 @@ Loosely based on [Tim Cowlishaw's implementation of the same algorithm](https://
33
33
 
34
34
  ## License
35
35
 
36
- Copyright © 2015 Altmetric LLP
36
+ Copyright © 2015-2016 Altmetric LLP
37
37
 
38
38
  Distributed under the MIT License.
@@ -95,5 +95,9 @@ class AhoCorasickMatcher
95
95
 
96
96
  failure
97
97
  end
98
+
99
+ def inspect
100
+ format('#<%s:0x%x', self.class.name, object_id << 1)
101
+ end
98
102
  end
99
103
  end
@@ -78,4 +78,12 @@ RSpec.describe AhoCorasickMatcher do
78
78
  ).to eq(%w(Test TestString String Test))
79
79
  end
80
80
  end
81
+
82
+ describe '#inspect' do
83
+ let(:dict) { ('aaa'...'bbb').to_a }
84
+
85
+ it 'does not include instance variables to prevent stack explosions' do
86
+ expect(matcher.inspect).not_to include('@child_map')
87
+ end
88
+ end
81
89
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aho_corasick_matcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew MacLeod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-26 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 2.4.5
60
+ rubygems_version: 2.5.1
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: A library to search text for occurrences of a list of strings