class IRB::Irb
def truncate_prompt_main(str) # :nodoc:
def truncate_prompt_main(str) # :nodoc: str = str.tr(CONTROL_CHARACTERS_PATTERN, ' ') if str.size <= PROMPT_MAIN_TRUNCATE_LENGTH str else str[0, PROMPT_MAIN_TRUNCATE_LENGTH - PROMPT_MAIN_TRUNCATE_OMISSION.size] + PROMPT_MAIN_TRUNCATE_OMISSION end end