From: "H.Yamamoto" Date: 2005-10-25T13:39:36+09:00 Subject: Re: Crash in Tk demo of Ruby 1.9.0 CVS >> This adhok patch seems to prevent this error, but I don't think this patch is good enough. >> (I don't know GC mechanizm. Just tried and run fine.) > >The patch changes garbage_collect() to return now whether >there're rooms for new objects, rather than whether GC run. >It seems OK. > >And the succeeding line is not used. > > if (during_gc) return Qfalse; OK, I'll commit this. Index: gc.c =================================================================== RCS file: /src/ruby/gc.c,v retrieving revision 1.214 diff -u -w -b -p -r1.214 gc.c --- gc.c 18 Oct 2005 17:35:18 -0000 1.214 +++ gc.c 25 Oct 2005 04:17:13 -0000 @@ -1280,10 +1280,10 @@ garbage_collect(void) if (dont_gc || during_gc) { if (!freelist) { add_heap(); + return Qtrue; } return Qfalse; } - if (during_gc) return Qfalse; during_gc++; init_mark_stack();