class IRB::ReadlineInputMethod
def initialize
def initialize self.class.initialize_readline if Readline.respond_to?(:encoding_system_needs) IRB.__send__(:set_encoding, Readline.encoding_system_needs.name, override: false) end super @eof = false @completor = RegexpCompletor.new if Readline.respond_to?("basic_word_break_characters=") Readline.basic_word_break_characters = BASIC_WORD_BREAK_CHARACTERS end Readline.completion_append_character = nil Readline.completion_proc = ->(target) { bind = IRB.conf[:MAIN_CONTEXT].workspace.binding @completor.completion_candidates('', target, '', bind: bind) } end