summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 04:03:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 04:03:47 +0000
commit16f70ed4ba2a094d77eada4532fe50dd4d4a2a8a (patch)
treec1f0d3eb38e46174af51ed2208ac66c98304260c /io.c
parent0ecf102274b446fe0b840635a3e05c17763688a8 (diff)
* io.c (ruby_dup): start GC on ENOMEM as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 639f40b068..9e8710897c 100644
--- a/io.c
+++ b/io.c
@@ -363,7 +363,7 @@ ruby_dup(int orig)
fd = dup(orig);
if (fd < 0) {
- if (errno == EMFILE || errno == ENFILE) {
+ if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
rb_gc();
fd = dup(orig);
}