[ruby/reline] Catches Errno::ENODEV and Errno::EBADF in

get_screen_size. Closes https://github.com/ruby/reline/pull/690
(https://github.com/ruby/reline/pull/702)

* Catches exceptions Errno::ENODEV and Errno::EBADF in get_screen_size. Closes https://github.com/ruby/reline/pull/690

* Just catching Errno::ENOTTY and Errno::ENODEV

a5b5298e4a
This commit is contained in:
Vladimir Támara Patiño 2024-05-22 00:16:38 -04:00 committed by git
parent ae07c606b5
commit 911b7d1dcf

View file

@ -235,7 +235,7 @@ class Reline::ANSI
s = [ENV["LINES"].to_i, ENV["COLUMNS"].to_i]
return s if s[0] > 0 && s[1] > 0
[24, 80]
rescue Errno::ENOTTY
rescue Errno::ENOTTY, Errno::ENODEV
[24, 80]
end