summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--io.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index aa43d9e6c6..3a0074b686 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jan 3 11:36:51 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (ruby_dup): start GC on ENOMEM as well.
+
Tue Jan 2 10:29:54 2007 Eric Hodel <drbrain@segment7.net>
* ext/zlib/zlib.c: fix to compile on YARV
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);
}