aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-07-04 00:42:06 +0900
committeraycabta <aycabta@gmail.com>2020-08-18 19:04:31 +0900
commit215fe54777c7183198d9789b25ea0e0af016261b (patch)
tree33fb50e4f651ad0e524ea7331243f2d61bba2bab /lib/reline.rb
parentf0d3d4fedbfe64c704f8f1e42b1301384b7f52aa (diff)
downloadruby-215fe54777c7183198d9789b25ea0e0af016261b.tar.gz
[ruby/reline] Check Errno::EIO
Catch Errno::EIO what will be occurred if the console terminates I/O before Reline finishes rendering. https://github.com/ruby/reline/commit/e51eaa6d43
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 91863ebfea..f88c368e5c 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -243,6 +243,8 @@ module Reline
break if line_editor.finished?
end
Reline::IOGate.move_cursor_column(0)
+ rescue Errno::EIO
+ # Maybe the I/O has been closed.
rescue StandardError => e
line_editor.finalize
Reline::IOGate.deprep(otio)