title: Pasting text into IRB is incredibly slow. Readline issue?
body: <p>When I paste the following text into IRB or PRY running under ruby-enterprise-2011.03, it takes 13 seconds.</p>
  
  <pre><code># Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  </code></pre>
  
  <p>Pasting isn't slow when running irb with other ruby installations on the same computer.</p>
  
  <pre><code>  jruby-1.5.6
    jruby-1.6.3
    ruby-1.8.6-p420
    ruby-1.8.7-p352
    ruby-1.9.1-p431
    ruby-1.9.2-p290
    ruby-1.9.3-preview1
    or Mac OS X's default system install of 1.8.7-p249
  </code></pre>
  
  <p>This question is related to <a href="https://stackoverflow.com/questions/5624740/rails-console-running-incredibly-slowly-when-editing-text">Rails console running incredibly slowly when editing text</a>, but I'm not using rvm, and there is no slowness when writing, editing, or deleting text; Only pasting is slow. @fl00r's suggestion works, but that isn't a permanent fix.</p>
  
  <p>Also, if there are hard newlines in the pasted text, only the last line is slow. For example, pasting the following text only takes about 1.5 seconds</p>
  
  <pre><code># Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
  # sed do eiusmod tempor incididunt ut labore et dolore magna 
  # aliqua. 
  </code></pre>
  
  <p>I've noticed that REE loads a copy of libreadline that none of the other ruby installations load. Is there a way to configure and compile REE to ignore the libreadline file from MacPorts?</p>
  
  <pre><code>require 'readline'
  puts `lsof -p #{$$} | grep -i readline | awk '{print $9}'`
  puts
  </code></pre>
  
  <p>I ran the above script on several ruby installations. Only the bottom 2 installations (the REE installations) include the extra libreadline.</p>
  
  <pre><code>=== ruby-1.8.6-p36 ======================
  /opt/ruby-1.8.6-p36/lib/ruby/1.8/i686-darwin11.2.0/readline.bundle
  
  === ruby-1.8.6-p420 ======================
  /opt/ruby-1.8.6-p420/lib/ruby/1.8/i686-darwin11.0.1/readline.bundle
  
  === ruby-1.8.7-p352 ======================
  /opt/ruby-1.8.7-p352/lib/ruby/1.8/i686-darwin11.0.1/readline.bundle
  
  === ruby-1.9.1-p431 ======================
  /opt/ruby-1.9.1-p431/lib/ruby/1.9.1/i386-darwin11.0.1/readline.bundle
  
  === ruby-1.9.2-p290 ======================
  /opt/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.0.1/readline.bundle
  
  === ruby-1.9.3-preview1 ==================
  /opt/ruby-1.9.3-preview1/lib/ruby/1.9.1/x86_64-darwin11.0.1/readline.bundle
  
  === ruby-enterprise-1.8.7-2011.03 ========
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.0.1/readline.bundle
  /opt/local/lib/libreadline.6.2.dylib
  
  === ruby-enterprise-1.8.7-2012.01 ========
  /opt/ruby-enterprise-1.8.7-2012.01/lib/ruby/1.8/i686-darwin11.2.0/readline.bundle
  /opt/local/lib/libreadline.6.2.dylib
  </code></pre>