From: Hongli Lai Date: 2010-01-23T01:30:53+09:00 Subject: [ruby-core:27702] [Feature #2631] Allow IO#reopen to take a block Issue #2631 has been updated by Hongli Lai. I don't think this can be implemented easily. This can be implemented if the IO object in question is a File for which you know the filename. For sockets, pipes and other stuff it becomes tricker: one can emulate it backing up the underlying file descriptor by dup()ing it, but in my opinion that goes against my expectation of what #reopen should do: to replace the file descriptor with something else. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2631 ---------------------------------------- http://redmine.ruby-lang.org