From: Thomas Hurst Date: 2002-06-10T06:39:51+09:00 Subject: Re: Park and Sean....Possible memory bug in Ruby? I'm stumped! * Wesley J Landaker (wjl@icecavern.net) wrote: > If and when it gets garbage collected, the file will be closed. But if > you run a ton of these commands in a row, it's extremely easy to open > more files than is allowed by the OS before the garbage collector ever > kicks in. (Perhaps ruby ought to catch the error and run the garbage > collector, then try again transparently?) It does: file = fopen(fname, mode); if (!file) { 桟祁祁祁if (errno == EMFILE || errno == ENFILE) { 桟祁祁祁 rb_gc(); 桟祁祁祁 file = fopen(fname, mode); 桟祁祁祁} Spot the great use of mixed tabs and spaces to indent there ;) -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - To one large turkey add one gallon of vermouth and a demijohn of Angostura bitters. Shake. -- F. Scott Fitzgerald, recipe for turkey cocktail.