set IRB.conf[:MAIN_CONTEXT], catch :IRB_EXIT.