summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 03:37:56 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 03:37:56 +0000
commit5e49578140865407cf1b268c41db4c45feb1db72 (patch)
tree7e8f29ab30015bff4477580b302c223734e9a23a /io.c
parent7933bf76e9f5986f763241a1721ed91acb43c197 (diff)
downloadruby-5e49578140865407cf1b268c41db4c45feb1db72.tar.gz
ruby-5e49578140865407cf1b268c41db4c45feb1db72.tar.xz
ruby-5e49578140865407cf1b268c41db4c45feb1db72.zip
* io.c (ruby_dup): start GC on ENOMEM as well.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11455 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 411887297..fa44bf93e 100644
--- a/io.c
+++ b/io.c
@@ -318,7 +318,7 @@ ruby_dup(orig)
fd = dup(orig);
if (fd < 0) {
- if (errno == EMFILE || errno == ENFILE) {
+ if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
rb_gc();
fd = dup(orig);
}