diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-11-30 13:17:54 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-11-30 13:17:54 +0900 |
commit | 20065eabdb2235a605b61e03d72c19b2a20b52a5 (patch) | |
tree | ba2244e2f0eae7f65e1e8b40b178002891707091 /lib | |
parent | d400c44a554910df542a11f58ff0e2b767b909f7 (diff) |
lib/pp.rb (width_for): ignore Errno::EINVAL
The error is raised on Solaris
http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20211130T030003Z.fail.html.gz
```
1) Failure:
TestRubyOptions#test_require [/export/home/users/chkbuild/cb-gcc/tmp/build/20211130T030003Z/ruby/test/ruby/test_rubyoptions.rb:265]:
pid 7386 exit 1
| /export/home/users/chkbuild/cb-gcc/tmp/build/20211130T030003Z/ruby/lib/pp.rb:67:in `winsize': Invalid argument - <STDOUT> (Errno::EINVAL)
```
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pp.rb | 2 |
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 + rescue LoadError, NoMethodError, Errno::ENOTTY, Errno::EINVAL end (width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1 end |