summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2021-11-30 13:46:08 +0900
committerYusuke Endoh <[email protected]>2021-11-30 13:46:08 +0900
commit3288f0d09e35a98d3569c79fad654e38eaeb7a9c ()
tree9774d7eeda193ae939ab671c567bb70c26d1e034 /lib/pp.rb
parent20065eabdb2235a605b61e03d72c19b2a20b52a5 (diff)
lib/pp.rb (width_for): Ignore all syscall errors
According to nobu, Errno::EBAD is raised on Windows.
-rw-r--r--lib/pp.rb2
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ class PP < PrettyPrint
begin
require 'io/console'
_, width = out.winsize
- rescue LoadError, NoMethodError, Errno::ENOTTY, Errno::EINVAL
end
(width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1
end