extend/kernel: convert TTY-destined input to string

This commit is contained in:
Eric Knibbe 2023-08-02 09:22:15 -04:00
parent c1fe80ac82
commit 31a5df4bf2
No known key found for this signature in database
GPG Key ID: 179D9CDDDB814168

View File

@ -21,7 +21,7 @@ module Kernel
Context.current.verbose?
end
title = Tty.truncate(title) if $stdout.tty? && !verbose
title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose
Formatter.headline(title, color: :blue)
end
@ -50,7 +50,7 @@ module Kernel
Context.current.verbose?
end
title = Tty.truncate(title) if $stdout.tty? && !verbose && truncate == :auto
title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose && truncate == :auto
Formatter.headline(title, color: :green)
end