ruby-changes:55793
From: NAKAMURA <ko1@a...>
Date: Thu, 23 May 2019 15:35:21 +0900 (JST)
Subject: [ruby-changes:55793] NAKAMURA Usaku: c5cbabf8a8 (trunk): Use colorized IRB on Windows without checking `TERM`
https://git.ruby-lang.org/ruby.git/commit/?id=c5cbabf8a8 From c5cbabf8a8aa42b7dcf943c64274489286174108 Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku <usa@r...> Date: Thu, 23 May 2019 15:33:40 +0900 Subject: Use colorized IRB on Windows without checking `TERM` diff --git a/lib/irb/color.rb b/lib/irb/color.rb index 7af7118..eb95da8 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -43,7 +43,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/color.rb#L43 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/