From: Peter Zotov Date: 2012-09-18T09:56:09+09:00 Subject: Re: Dir.mktmpdir doesn't remove it at exit? Roger Pack писал 18.09.2012 01:22: >> Many methods in Ruby which deal with external resources >> (File.open/Socket.open anyone?) have both a block form (that cleans >> itself >> up automatically) and a non-block form that requires manual cleanup >> (e.g. >> close your file descriptors, although the GC will *eventually* do it >> for >> you if you can't be bothered to do that) >> >> This is no different. > > It also closes file descriptors "at_exit" for you, which is what I > expected here. > > Really what I'd expect here is for it to remove the directory "if > empty" > at exit, but maybe that is too hard in windows, which disallows > removing > non-empty directories? A pity if that's why the inconsistency was > introduced. Unixen don't allow removal of non-empty directories as well. -- WBR, Peter Zotov.