From: Tero Tilus Date: 2009-02-25T18:37:52+09:00 Subject: [ruby-core:22463] [Bug #1207] Readline#readline mangles input Bug #1207: Readline#readline mangles input http://redmine.ruby-lang.org/issues/show/1207 Author: Tero Tilus Status: Open, Priority: Normal ruby -v: ruby 1.8.5 (2006-08-25) [i486-linux] My irb eats every 511'th character of pasted data. I've narrowed the issue down to readline lib Ruby uses. class MyReadline include Readline def rl(*args) readline(*args) end end r = MyReadline.new puts r.rl.length # paste 100 chars 6 times # => 600 puts r.rl.length # paste 600 chars # => 599 # Pasted 600 chars looks like this on my term. # Notice missing "1", which should have been 511'th char (11'th of the last 100 char sequence). # Pasted string is (("1234567890"*10).chop+' ')*6 # i.e. sequentially repeated numbers and every 100'th is space 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 12345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 I'm on Debian etch with ruby1.8 (1.8.5-4etch4) and libreadline-ruby1.8 (1.8.5-4etch4) installed. $ uname -a Linux naakka 2.6.18-6-686 #1 SMP Sat Dec 27 09:31:05 UTC 2008 i686 GNU/Linux $ ruby --version ruby 1.8.5 (2006-08-25) [i486-linux] $ irb --version irb 0.9.5(05/04/13) $ gem -v readline 1.2.0 Issue is imo likely to be same/related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498277 ---------------------------------------- http://redmine.ruby-lang.org