From: Eric Wong Date: 2011-04-09T12:28:02+09:00 Subject: [ruby-core:35671] Re: [Ruby 1.9 - Bug #4558] TestSocket#test_closed_read fails after r31230 Eric Wong wrote: > Thanks for testing, think I have a better fix below (supercedes my > original fix) > > Also pushed to the "io-close-fixes" branch of git://bogomips.org/ruby.git Oops, I broke test/ruby/test_thread.rb in the atexit handlers :x I squashed the following change and forcibly repushed: diff --git a/io.c b/io.c index 5d37b7f..65e7693 100644 --- a/io.c +++ b/io.c @@ -3562,7 +3562,8 @@ fptr_finalize(rb_io_t *fptr, int noraise) fptr->stdio_file = 0; fptr->fd = -1; - rb_thread_fd_close(fd); + if (!noraise) + rb_thread_fd_close(fd); goto skip_fd_close; } if (fptr->stdio_file) { -- Eric Wong