safe_regexp 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/safe_regexp.rb +4 -0
- data/lib/safe_regexp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1b53f631242793887df75393c4014b95d315c0da5d29ca71a19fdbee8ea0814
|
4
|
+
data.tar.gz: 8feeb084ff50295347f4d1912c4a60411d6a35a1926356a5bc11f50cc6f5c356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35168912597704b09226bdea3250b79e33b59fe1efa45e6cc1dda3e86b62ffafd40139f8a25846b9dd0e91451b5d8df6933be4ebe9979ecaacf6675b5b9e64c7
|
7
|
+
data.tar.gz: 60c632ae1285e018beb9332be2a81a75c04d76d0127c387528fa24720062e0fe9499eeab189a4f6c05b5d3e5279808d932fa5e201e9cf0a04abc15916e8cbd13
|
data/lib/safe_regexp.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require "timeout"
|
2
3
|
|
3
4
|
module SafeRegexp
|
4
5
|
RESCUED_EXCEPTION = StandardError
|
@@ -79,7 +80,10 @@ module SafeRegexp
|
|
79
80
|
pid = fork do
|
80
81
|
in_write.close
|
81
82
|
out_read.close
|
83
|
+
|
84
|
+
Process.setproctitle("ruby safe_regexp worker")
|
82
85
|
keepalive = 1 # initial payload should come in shortly after boot
|
86
|
+
|
83
87
|
loop do
|
84
88
|
break unless IO.select([in_read], nil, nil, keepalive)
|
85
89
|
begin
|
data/lib/safe_regexp/version.rb
CHANGED