multi_string_replace 1.0.4 → 1.0.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce55106984f5b33c6b5dfe633fffb82c42cab34a1bd0516ef98025e8498bd172
|
4
|
+
data.tar.gz: cf3fc9d870bbf27f7d6869fefe0e2513871b2fb667ce83812b7e5630f9c06530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cae97ff557266b797ea98e429218d0d39c95ad898d81cb82015746f80316cbe7f671af556c9b11f670730806370896a302f314290b026420a5e04d4e9e0226f1
|
7
|
+
data.tar.gz: f3e5e05f96c38df6f9f1782f03f76ba68d77e4f1aa278bcc902bbaeeff363922116d05b3c58fa492525c51db26c923a4bfdbdad3bba1cae39fbf380bccd8564f
|
File without changes
|
@@ -226,7 +226,7 @@ VALUE aho_replace_text(struct ahocorasick * restrict aho, const char* data,
|
|
226
226
|
last_concat_pos = i + 1;
|
227
227
|
}
|
228
228
|
|
229
|
-
if (last_concat_pos < data_len
|
229
|
+
if (last_concat_pos < data_len) {
|
230
230
|
rb_str_cat(main_result, &data[last_concat_pos], data_len - last_concat_pos);
|
231
231
|
}
|
232
232
|
|
@@ -55,6 +55,7 @@ VALUE multi_string_match(VALUE self, VALUE body, VALUE keys)
|
|
55
55
|
|
56
56
|
aho_create_trie(&aho);
|
57
57
|
aho_register_match_callback(result, &aho, callback_match_pos, (void*)target);
|
58
|
+
|
58
59
|
aho_findtext(&aho, target, RSTRING_LEN(body));
|
59
60
|
aho_destroy(&aho);
|
60
61
|
return result;
|
@@ -99,7 +100,6 @@ VALUE multi_string_replace(VALUE self, VALUE body, VALUE replace)
|
|
99
100
|
aho_add_match_text(&aho, StringValuePtr(entry), RSTRING_LEN(entry));
|
100
101
|
}
|
101
102
|
aho_create_trie(&aho);
|
102
|
-
|
103
103
|
VALUE result = aho_replace_text(&aho, target, RSTRING_LEN(body), values, value_sizes, ruby_val);
|
104
104
|
aho_destroy(&aho);
|
105
105
|
return result;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_string_replace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Dayo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- bin/benchmark.rb
|
88
88
|
- bin/console
|
89
89
|
- bin/setup
|
90
|
+
- ext/multi_string_replace/.sitearchdir.-.multi_string_replace.time
|
90
91
|
- ext/multi_string_replace/aho_queue.c
|
91
92
|
- ext/multi_string_replace/aho_queue.h
|
92
93
|
- ext/multi_string_replace/aho_text.h
|
@@ -106,7 +107,7 @@ licenses:
|
|
106
107
|
- MIT
|
107
108
|
metadata:
|
108
109
|
allowed_push_host: https://rubygems.org
|
109
|
-
post_install_message:
|
110
|
+
post_install_message:
|
110
111
|
rdoc_options: []
|
111
112
|
require_paths:
|
112
113
|
- lib
|
@@ -121,9 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
requirements: []
|
124
|
-
|
125
|
-
|
126
|
-
signing_key:
|
125
|
+
rubygems_version: 3.1.6
|
126
|
+
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: A fast multiple string replace library for ruby. Uses a C implementation
|
129
129
|
of the Aho–Corasick Algorithm
|