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:
parent
005ea4898d
commit
df866e40a9
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue