summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--gc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0feb6c94d1..8ed697ff9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,7 @@ Sat Jul 15 01:09:22 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
malloc/calloc, to detect memory allocation failure. see
<http://www.nongnu.org/failmalloc/>.
- * gc.c (rb_memerror): should not raise nomem_error.
+ * gc.c (rb_memerror): should not raise empty nomem_error.
Fri Jul 14 13:08:13 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
diff --git a/gc.c b/gc.c
index c73da2c278..04f28e634a 100644
--- a/gc.c
+++ b/gc.c
@@ -95,7 +95,7 @@ rb_memerror()
{
static int recurse = 0;
- if (recurse > 0 && rb_safe_level() < 4) {
+ if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(1);
}