From df866e40a914d08f571b2f6aa10e1015ce940874 Mon Sep 17 00:00:00 2001 From: Robert Gleeson Date: Sat, 1 Feb 2014 01:21:38 +0100 Subject: [PATCH] update Pry::REPL to not assume Readline is loaded. --- lib/pry/repl.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry/repl.rb b/lib/pry/repl.rb index fa1caf04..0fa8d753 100644 --- a/lib/pry/repl.rb +++ b/lib/pry/repl.rb @@ -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