mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
fix #1464
This commit is contained in:
parent
65fd1330fd
commit
10c8d19d1f
2 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue