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

update Pry::REPL to not assume Readline is loaded.

This commit is contained in:
Robert Gleeson 2014-02-01 01:21:38 +01:00
parent 005ea4898d
commit df866e40a9

View file

@ -179,9 +179,9 @@ class Pry
end
end
if input == Readline
if defined?(Readline) and input == Readline
if !$stdout.tty? && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
Readline.output = File.open('/dev/tty', 'w')
_pry_.input.output = File.open('/dev/tty', 'w')
end
input_readline(current_prompt, false) # false since we'll add it manually
elsif defined? Coolline and input.is_a? Coolline