From 911b7d1dcfdb613ea5f648bd59bc6e29f9d54c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Wed, 22 May 2024 00:16:38 -0400 Subject: [PATCH] [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 https://github.com/ruby/reline/commit/a5b5298e4a --- lib/reline/ansi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index 45a475a787..fa9feb2630 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -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