From: Yusuke Endoh Date: 2010-05-30T17:57:26+09:00 Subject: [ruby-core:30507] [Bug #3119][Feedback] [Patch] "IOError (closed stream)" error with tempfile unlink then close usage Issue #3119 has been updated by Yusuke Endoh. Status changed from Open to Feedback Priority changed from Normal to Low Hi, 2010/4/10 Simon Nicholls : > The Tempfile#unlink method clobbers Tempfile's @data variable, which _close needs in order to remove it's reference to the tmpfile correctly. > > This means that when the Remover finalizer runs, the (still valid) reference it has to @data is inspected, the tmpfile is found when it shouldn't be, and the tmpfile is closed again to cause the error. I can't understand what you say... The following does not cause error on my environment: $ ./ruby -rtempfile -e 't = Tempfile.new("foo"); t.unlink' Please explain reproducing process and actual output. -- Yusuke Endoh ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3119 ---------------------------------------- http://redmine.ruby-lang.org