Merge pull request #5896 from dearblue/dir-open

Avoid `IOError` when returning from `Dir.open`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-01-01 19:27:45 +09:00
committed by GitHub
+4 -1
View File
@@ -36,7 +36,10 @@ class Dir
begin
block.call(d)
ensure
d.close
begin
d.close
rescue IOError
end
end
else
self.new(path)