diff options
| author | Taketo Takashima <t.taketo1113@gmail.com> | 2025-10-07 22:35:23 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-12 18:51:23 +0900 |
| commit | f1972d400b5b8ecb7414b199e6a511dd832f0eb9 (patch) | |
| tree | eb52e53828fc08021ff46bfe865300638ba9a7e2 | |
| parent | d1240393ab86c8f681f84d88fd498c75409080f4 (diff) | |
Fix SyntaxError: unexpected keyword_rescue, expecting keyword_end in Ruby 2.4 and earlier
| -rw-r--r-- | tool/lib/envutil.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tool/lib/envutil.rb b/tool/lib/envutil.rb index fef9a0c992..ea1f83e6f0 100644 --- a/tool/lib/envutil.rb +++ b/tool/lib/envutil.rb @@ -104,9 +104,11 @@ module EnvUtil else return unless dpid [[timeout, :TERM], [reprieve, :KILL]].find do |t, sig| - return EnvUtil.timeout(t) {Process.wait(dpid)} - rescue Timeout::Error - Process.kill(sig, dpid) + begin + return EnvUtil.timeout(t) {Process.wait(dpid)} + rescue Timeout::Error + Process.kill(sig, dpid) + end end true end |
