[macruby-changes] [183] MacRuby/trunk/gc.c

source_changes at macosforge.org source_changes at macosforge.org
Thu May 1 16:12:25 PDT 2008


Revision: 183
          http://trac.macosforge.org/projects/ruby/changeset/183
Author:   lsansonetti at apple.com
Date:     2008-05-01 16:12:24 -0700 (Thu, 01 May 2008)

Log Message:
-----------
fix for #43

Modified Paths:
--------------
    MacRuby/trunk/gc.c

Modified: MacRuby/trunk/gc.c
===================================================================
--- MacRuby/trunk/gc.c	2008-05-01 20:59:46 UTC (rev 182)
+++ MacRuby/trunk/gc.c	2008-05-01 23:12:24 UTC (rev 183)
@@ -298,7 +298,13 @@
 	garbage_collect();
     }
 #if WITH_OBJC
-    assert(__auto_zone != NULL);
+    if (__auto_zone == NULL) {
+    	fprintf(stderr,
+		"The client that links against MacRuby was not built for "\
+		"GC. Please turn on garbage collection (-fobjc-gc) and "\
+		"try again.\n");
+	exit(1);
+    }
     RUBY_CRITICAL(mem = auto_zone_allocate_object(__auto_zone, size, 
 						  AUTO_MEMORY_SCANNED, 0, 0));
     xmalloc_count++;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080501/5a35981e/attachment.html


More information about the macruby-changes mailing list