Skip to content
Snippets Groups Projects
Commit 5ee6df6d authored by Markus Reiter's avatar Markus Reiter
Browse files

Fallback to `$stdout.tty?` unless `respond_to?(:tty?)`.

parent a89dc338
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ module Kernel
def puts_columns(*objects, gap_size: 2)
objects.flatten!
if objects.empty? || (respond_to?(:tty?) && !tty?)
if objects.empty? || (respond_to?(:tty?) ? !tty? : !$stdout.tty?)
puts(*objects)
return
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment