Commit 2032d92
committed
Avoid closing directory we're iterating
Ruby 3.4 started error checking directory access and starts to raise
Errno::EBADF.
This particular loop iterates on all open file descriptors and one is
the directory listing from Dir.foreach.
In the past this could have led to leaked file descriptors, but it's
unlikely since it's likely the last opened file descriptor and have the
highest number.
Link: ruby/ruby@f2919bd
Link: https://bugzilla.redhat.com/show_bug.cgi?id=23493521 parent e227c27 commit 2032d92
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
| |||
0 commit comments