# File lib/optconfig.rb, line 260
  def parse_file(filename)
    cur_sect = nil
    File.open filename do |f|
      f.each_line do |line|
        line.chomp!
        next if line =~ /\A#|\A\s*\z/
        if line =~ /\A\[(.*)\]\z/
          cur_sect = $1
          next
        end
        if @section.nil? or @section.empty? or @section.to_a.include? cur_sect
          name, value = line.split(/\s*=\s*|\s+/, 2)
          begin
            opt = parse_long_opt "#{name}=#{value}", [], false
            opt.value = opt.default unless opt.in_config
          rescue UnknownOption
            raise unless @ignore_unknown_file_option
          end
        end
      end
    end
  end