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/.