From: Giampiero Zanchi Date: 2010-03-10T20:50:49+09:00 Subject: Re: how to test if a file is open ? You could use exceptions try to read from file; if it is closed, then an exception will be raised; then you can do something, for instance set a boolean and return it... def is_open(a_file) begin ...read from file... rescue ...if file is not open then do something... end end -- Posted via http://www.ruby-forum.com/.