Commit 4660929
Apply the same GC fix to DirSingletonTest#test_for_fd
test_for_fd has the same pattern as test_fchdir: the Dir from
`Dir.new(Dir.pwd).fileno` is collectable before `Dir.for_fd(fd)` runs,
so an ill-timed GC closes the fd and the call fails with Errno::EBADF.
Keep the Dir alive in a local and close it in ensure.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent cb9ef2d commit 4660929
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
0 commit comments