1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
This commit is contained in:
strcmp 2015-08-22 15:14:26 +01:00
parent 65fd1330fd
commit 10c8d19d1f
2 changed files with 2 additions and 2 deletions

View file

@ -219,7 +219,7 @@ class Pry
# # `piping?` returns `true`
# % pry | tee log
def piping?
!$stdout.tty? && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
!($stdout.respond_to?(:tty?) and $stdout.tty?) && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
end
# @return [void]

View file

@ -47,7 +47,7 @@ class Pry::Terminal
require 'io/console'
begin
if $stdout.tty? && $stdout.respond_to?(:winsize)
if $stdout.respond_to?(:tty?) && $stdout.tty? && $stdout.respond_to?(:winsize)
$stdout.winsize
end
rescue Errno::EOPNOTSUPP