1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Explicitly require rb-readline

On my 1.8 on mac-os installed with rbenv with no readline, "require 'readline'"
raises a LoadError even when rb-readline is installed.
This commit is contained in:
Conrad Irwin 2013-03-24 23:40:19 -07:00
parent 8f827ea403
commit af8a21bb4f

View file

@ -216,7 +216,11 @@ require 'tempfile'
require 'pathname' require 'pathname'
begin begin
require 'readline' begin
require 'readline'
rescue LoadError => e
require 'rb-readline'
end
rescue LoadError rescue LoadError
warn "You're running a version of ruby with no Readline support" warn "You're running a version of ruby with no Readline support"
warn "Please `gem install rb-readline` or recompile ruby --with-readline." warn "Please `gem install rb-readline` or recompile ruby --with-readline."