We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c55474f commit 0bbe435Copy full SHA for 0bbe435
lib/irb/color.rb
@@ -79,12 +79,12 @@ module Color
79
80
class << self
81
def colorable?
82
- supported = $stdout.tty? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
+ supported = $stdout.tty? && (/mswin|mingw/.match?(RUBY_PLATFORM) || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
83
84
# because ruby/debug also uses irb's color module selectively,
85
# irb won't be activated in that case.
86
if IRB.respond_to?(:conf)
87
- supported && IRB.conf.fetch(:USE_COLORIZE, true)
+ supported && !!IRB.conf.fetch(:USE_COLORIZE, true)
88
else
89
supported
90
end
0 commit comments