Fallback to $stdout.tty? unless respond_to?(:tty?).
This commit is contained in:
parent
a89dc33834
commit
5ee6df6d82
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user