From: Simon Nicholls Date: 2010-05-30T21:18:13+09:00 Subject: [ruby-core:30525] [Bug #3119] [Patch] "IOError (closed stream)" error with tempfile unlink then close usage Issue #3119 has been updated by Simon Nicholls. File test_unlink_then_close_clears_data.diff added Here's a failing test patch. It looks like mocks are avoided in the Ruby test code. Is this the case? I would prefer to test that tmpfile is not closed a second time, using a mock expectation (to test expected behaviour instead of implementation). Without that I've resorted to instance_variable_get, to verify the @data clean-up that Remover#call relies upon has indeed happened in the unlink -> close case. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3119 ---------------------------------------- http://redmine.ruby-lang.org