From 57d67c2229d58f2737d00482a2f01e9179499ee3 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 30 Jan 2024 03:14:57 +0800 Subject: [PATCH] Fix `Colorize.enabled?`'s documentation (#14258) --- src/colorize.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/colorize.cr b/src/colorize.cr index 48975c8a451f..83fd82c3935e 100644 --- a/src/colorize.cr +++ b/src/colorize.cr @@ -129,8 +129,7 @@ module Colorize # "hello".colorize.red.to_s # => "hello" # ``` # - # NOTE: This is by default disabled on non-TTY devices because they likely don't support ANSI escape codes. - # This will also be disabled if the environment variable `TERM` is "dumb" or `NO_COLOR` contains any value. + # NOTE: This is by default disabled if the environment variable `NO_COLOR` contains any value. class_property? enabled : Bool { !ENV.has_key?("NO_COLOR") } # Makes `Colorize.enabled` `true` if and only if both of `STDOUT.tty?`