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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a08c39c5fefd324f445219dd0a9c1480fc6e7fb9a8d87d2a8c94cb8fe9ffe842
4
- data.tar.gz: 5a0fcafc1b454f4cbb870d3ca5ec6052614688c6f1431cd9e413e2542e07a691
3
+ metadata.gz: a1b53f631242793887df75393c4014b95d315c0da5d29ca71a19fdbee8ea0814
4
+ data.tar.gz: 8feeb084ff50295347f4d1912c4a60411d6a35a1926356a5bc11f50cc6f5c356
5
5
  SHA512:
6
- metadata.gz: dfce8cc283436b706e02be017a6b5cc515255ff058b853c10cfbd9c568ae8e5e73f7e8f368a3fbf6bb97164cb6ec6caee1845973dc5e0e13f1147664fc972b65
7
- data.tar.gz: 05ae09e0f259262cc3f5b93b6c180ecea9031efc8f17e1234b04d0720bc057707d959b0a978d2d0c0cb2021e4e3d68f0ba53a8623170ebded1c752a91ecc6331
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SafeRegexp
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safe_regexp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser