# File lib/rdoc/rdoc.rb, line 157
  def load_options
    options_file = File.expand_path '.rdoc_options'
    return RDoc::Options.new unless File.exist? options_file

    RDoc.load_yaml

    parse_error = if Object.const_defined? :Psych then
                    Psych::SyntaxError
                  else
                    ArgumentError
                  end

    begin
      options = YAML.load_file '.rdoc_options'
    rescue *parse_error
    end

    raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless
      RDoc::Options === options

    options
  end