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`
|
# # `piping?` returns `true`
|
||||||
# % pry | tee log
|
# % pry | tee log
|
||||||
def piping?
|
def piping?
|
||||||
!$stdout.tty? && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
|
!($stdout.respond_to?(:tty?) and $stdout.tty?) && $stdin.tty? && !Pry::Helpers::BaseHelpers.windows?
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [void]
|
# @return [void]
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Pry::Terminal
|
||||||
require 'io/console'
|
require 'io/console'
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if $stdout.tty? && $stdout.respond_to?(:winsize)
|
if $stdout.respond_to?(:tty?) && $stdout.tty? && $stdout.respond_to?(:winsize)
|
||||||
$stdout.winsize
|
$stdout.winsize
|
||||||
end
|
end
|
||||||
rescue Errno::EOPNOTSUPP
|
rescue Errno::EOPNOTSUPP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue