What might be cool and more ruby-like is to define a method called #opened that takes a block and yields to it after checking to make sure the file is open.

You could then write this method like

    def seek(pos, whence=IO::SEEK_SET)
      opened do
        if whence == IO::SEEK_CUR
          @file_position += pos
        elsif whence == IO::SEEK_END
          @file_position = @file_length + pos
        else
          @file_position = pos
        end
      end
      @file_position
    end