Skip to content

Commit 3f344ab

Browse files
committed
Please RuboCop
1 parent 8a6bf3e commit 3f344ab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/puppet/util.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ def safe_posix_fork(stdin = $stdin, stdout = $stdout, stderr = $stderr, &block)
481481
d = Dir.new('/proc/self/fd')
482482
ignore_fds = ['.', '..', d.fileno.to_s]
483483
d.each_child do |f|
484-
if !ignore_fds.include?(f) && f.to_i >= 3
485-
begin
486-
IO.new(f.to_i).close
487-
rescue
488-
nil
489-
end
484+
next if ignore_fds.include?(f) || f.to_i < 3
485+
486+
begin
487+
IO.new(f.to_i).close
488+
rescue
489+
nil
490490
end
491491
end
492492
rescue Errno::ENOENT, Errno::ENOTDIR # /proc/self/fd not found, /proc/self not a dir

0 commit comments

Comments
 (0)