From 5c3a83fc0ee2f9d4658d525fb543adf9a8d5ea19 Mon Sep 17 00:00:00 2001 From: Seth Kingsley Date: Mon, 1 Feb 2016 09:30:20 -0800 Subject: [PATCH] Use IO.console for readline over STD{IN,OUT,ERR}. --- lib/byebug/interfaces/local_interface.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/byebug/interfaces/local_interface.rb b/lib/byebug/interfaces/local_interface.rb index bc9630ac6..1e56a98f4 100644 --- a/lib/byebug/interfaces/local_interface.rb +++ b/lib/byebug/interfaces/local_interface.rb @@ -1,4 +1,6 @@ # frozen_string_literal: true +require 'io/console' + module Byebug # # Interface class for standard byebug use. @@ -8,9 +10,9 @@ class LocalInterface < Interface def initialize super() - @input = STDIN - @output = STDOUT - @error = STDERR + @input = @output = @error = IO.console + Readline.input = @input + Readline.output = @output end #