mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lib/pp.rb (width_for): Ignore all syscall errors
According to nobu, Errno::EBAD is raised on Windows.
This commit is contained in:
parent
20065eabdb
commit
3288f0d09e
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class PP < PrettyPrint
|
|||
begin
|
||||
require 'io/console'
|
||||
_, width = out.winsize
|
||||
rescue LoadError, NoMethodError, Errno::ENOTTY, Errno::EINVAL
|
||||
rescue LoadError, NoMethodError, SystemCallError
|
||||
end
|
||||
(width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue