class IRB::RelineInputMethod

def display_document(matched, driver: nil)

def display_document(matched, driver: nil)
  begin
    require 'rdoc'
  rescue LoadError
    return
  end
  if matched =~ /\A(?:::)?RubyVM/ and not ENV['RUBY_YES_I_AM_NOT_A_NORMAL_USER']
    IRB.__send__(:easter_egg)
    return
  end
  _target, preposing, postposing, bind = @completion_params
  namespace = @completor.doc_namespace(preposing, matched, postposing, bind: bind)
  return unless namespace
  driver ||= RDoc::RI::Driver.new
  if namespace.is_a?(Array)
    out = RDoc::Markup::Document.new
    namespace.each do |m|
      begin
        driver.add_method(out, m)
      rescue RDoc::RI::Driver::NotFoundError
      end
    end
    driver.display(out)
  else
    begin
      driver.display_names([namespace])
    rescue RDoc::RI::Driver::NotFoundError
    end
  end
end