From: matz@... (Yukihiro Matsumoto) Date: 2004-02-16T22:51:36+09:00 Subject: Re: `close': Bad file descriptor - filename (Errno::EBADF) Hi, In message "`close': Bad file descriptor - filename (Errno::EBADF)" on 04/02/16, Simon Strandgaard writes: |While upgrading rubicon from 1.6 to 1.8, I bumped into |this problem in the builtin/TestIO.rb file. |http://rubyforge.org/cgi-bin/viewcvs/cgi/viewcvs.cgi/rubicon/builtin/TestIO.rb?cvsroot=rubytests It's a bug in rubicon. Try test suites bundled with 1.8.1 or later. |File.open(file, "w") do |f| | io = IO.new(f.fileno, "w") | io << 1 << "\n" << "dummy" << "\n" << "cat\n" | io.close <= close io here. |end <= open close io at the end of block (i.e. double close) matz.