From 8cee36b1b58b7bc092d87b6c5482b654913ec4d4 Mon Sep 17 00:00:00 2001 From: Tomoyuki Sahara Date: Fri, 13 Dec 2013 15:49:32 +0900 Subject: Catch Errno::ENFILE too. When system file descriptor table is full, errno is set to ENFILE instead of EMFILE. They are similar but different. --- mrblib/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrblib/file.rb b/mrblib/file.rb index 048fbae80..aaa88616f 100644 --- a/mrblib/file.rb +++ b/mrblib/file.rb @@ -16,7 +16,7 @@ class File < IO @path = fd_or_path begin fd = IO.sysopen(@path, mode, perm) - rescue Errno::EMFILE + rescue Errno::EMFILE, Errno::ENFILE GC.start fd = IO.sysopen(@path, mode, perm) end -- cgit v1.2.3