Skip to content

Commit a984736

Browse files
authored
Update util.rb
A per comment (#39 (comment)) in PR(#39)
1 parent 6d3a863 commit a984736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/util.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ def safe_posix_fork(stdin = $stdin, stdout = $stdout, stderr = $stderr, &block)
479479

480480
begin
481481
Dir.foreach('/proc/self/fd') do |f|
482-
if f != '.' && f != '..' && f.to_i >= 3
482+
if %{^\d+$}.match?(f) && f.to_i >= 3
483483
begin
484-
IO.new(f).close
484+
IO.new(f.to_i).close
485485
rescue
486486
nil
487487
end

0 commit comments

Comments
 (0)