Issue #6228 has been updated by luislavena (Luis Lavena). Status changed from Assigned to Feedback luislavena (Luis Lavena) wrote: > I'll commit suggested patch from nagachika-san. > I seem unable to reproduce the exact exception on both trunk and ruby_1_9_3 branches. The error seems randomly manifest. Right now, against ruby_1_9_3, it shows in test_invalid_advise <pre> 5) Error: test_invalid_advise(TestIO): Errno::EBADF: Bad file descriptor - C:/Users/Luis/AppData/Local/Temp/test_io20120427-1432-1xmkrxh C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1119:in `make_tempfile' C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1872:in `block (2 levels) in test_invalid_advise' C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1871:in `each' C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1871:in `block in test_invalid_advise' C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1870:in `each' C:/Users/Luis/Projects/oss/ruby/test/ruby/test_io.rb:1870:in `test_invalid_advise' ../test/runner.rb:15:in `<main>' </pre> ---------------------------------------- Bug #6228: [mingw] Errno::EBADF in ruby/test_io.rb on ruby_1_9_3 https://bugs.ruby-lang.org/issues/6228#change-26264 Author: jonforums (Jon Forums) Status: Feedback Priority: Normal Assignee: luislavena (Luis Lavena) Category: test Target version: 1.9.3 ruby -v: ruby 1.9.3p172 (2012-03-30 revision 35179) [i386-mingw32] On Win7 32bit built with MinGW 4.6.2 using the RubyInstaller build recipes, I get the following test error: sh-3.1$ ruby --version ruby 1.9.3p172 (2012-03-30 revision 35179) [i386-mingw32] sh-3.1$ make test-all TESTS='openssl fiddle psych zlib io json mkmf pathname stringio erb fileutils ruby/test_io.rb ruby/test_io_m17n.rb ruby/test_file.rb' 7) Error: test_lines(TestIO): Errno::EBADF: Bad file descriptor c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:33:in `close' c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:33:in `rescue in block in pipe' c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:30:in `block in pipe' -- http://bugs.ruby-lang.org/