mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 14:05:02 +02:00

This reverts commit 6e84ac2359
.
Now that the rubygems spec change has been merged, let's try reverting
this and fixing it with tompng's new patch.
41 lines
694 B
Ruby
41 lines
694 B
Ruby
|
|
module Reline
|
|
class IO
|
|
RESET_COLOR = "\e[0m"
|
|
|
|
def self.decide_io_gate
|
|
if ENV['TERM'] == 'dumb'
|
|
Reline::Dumb.new
|
|
else
|
|
require 'reline/io/ansi'
|
|
|
|
case RbConfig::CONFIG['host_os']
|
|
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
|
require 'reline/io/windows'
|
|
io = Reline::Windows.new
|
|
if io.msys_tty?
|
|
Reline::ANSI.new
|
|
else
|
|
io
|
|
end
|
|
else
|
|
Reline::ANSI.new
|
|
end
|
|
end
|
|
end
|
|
|
|
def dumb?
|
|
false
|
|
end
|
|
|
|
def win?
|
|
false
|
|
end
|
|
|
|
def reset_color_sequence
|
|
self.class::RESET_COLOR
|
|
end
|
|
end
|
|
end
|
|
|
|
require 'reline/io/dumb'
|