aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2019-05-23 15:33:40 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2019-05-23 15:33:40 +0900
commitc5cbabf8a8aa42b7dcf943c64274489286174108 (patch)
treea607c246aa0c28d458a2752ed23a4321cf095956 /lib
parent0acbdd1ed0d2302743525a5188cc5a0d6251680c (diff)
downloadruby-c5cbabf8a8aa42b7dcf943c64274489286174108.tar.gz
Use colorized IRB on Windows without checking `TERM`
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/color.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb
index 7af7118849..eb95da8229 100644
--- a/lib/irb/color.rb
+++ b/lib/irb/color.rb
@@ -43,7 +43,7 @@ module IRB # :nodoc:
class << self
def colorable?
- $stdout.tty? && ENV.key?('TERM') && ENV['TERM'] != 'dumb'
+ $stdout.tty? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
end
def inspect_colorable?(obj)