From: "ralf.kistner@... (Ralf Kistner)" Date: 2012-05-04T15:58:13+09:00 Subject: [ruby-core:44868] [ruby-trunk - Bug #5023] irb does not like window resizes Issue #5023 has been updated by ralf.kistner@gmail.com (Ralf Kistner). This is solved by using Readline.set_screen_size(lines, columns) to the correct size, every time the size has changed. The only reliable way I've found to get the terminal size is with the 'ruby-terminfo' gem: https://github.com/genki/ruby-terminfo require 'terminfo' Readline.set_screen_size(TermInfo.screen_size[0], TermInfo.screen_size[1]) Calling the above two lines before each readline() solved the issue for me. Also see my answer on this stackoverflow post: http://stackoverflow.com/a/10444128/214837 ---------------------------------------- Bug #5023: irb does not like window resizes https://bugs.ruby-lang.org/issues/5023#change-26441 Author: michas (Michael Schnupp) Status: Assigned Priority: Normal Assignee: keiju (Keiju Ishitsuka) Category: Target version: 2.0.0 ruby -v: ruby 1.9.3dev (2011-07-10 trunk 32499) [x86_64-linux] - open irb - type until line wraps to the next line - increase the width of the terminal - notice that the text of in the second line will not come up to the first line. -> there is no more useful display/navigation in long lines unless window is resized to exactly the same width. :( My irb uses libreadline. (Readline module is visible and config in ~/.inputrc is applied.) Other readline applications like bash do not have that problem. irb in 1.8 works fine, too. all versions of 1.9 (including head) have the described problem. (I tested mainly on my ubuntu box.) -- http://bugs.ruby-lang.org/