Skip to content

Commit f46daca

Browse files
committed
Remove unused #find_unused_fd helper
* It is not safe in general to assume anything about a fd lifetime without using it. The fd might be used by another thread or some other logic just after the call returns.
1 parent e1dd769 commit f46daca

File tree

1 file changed

+0
-4
lines changed
  • spec/mspec/lib/mspec/helpers

1 file changed

+0
-4
lines changed

spec/mspec/lib/mspec/helpers/io.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,3 @@ def new_io(name, mode = "w:utf-8")
8585
File.new(name, mode)
8686
end
8787
end
88-
89-
def find_unused_fd
90-
Dir.entries("/dev/fd").map(&:to_i).max + 1
91-
end

0 commit comments

Comments
 (0)