On 25/02/2006, at 10:58, Soryu wrote:
Apparently I do open all the files to scan them but do not close them afterwards. D'oh! This should now be fixed.
Whenever possibly, use the 'auto-dispose' way of obtaining such resources, like File.open(filename) do |f| ..the code.. end
which will close the file regardless of how the block is left (normally, 'return', exceptins, throw etc.) Alternatively, use 'ensure' which is really what the above is: begin f = File.open(...) ... ensure f.close end
(Oh and I didn't look at your code before writing this, so apologies if it's all old news).
-- Sune.