diff options
author | aycabta <aycabta@gmail.com> | 2020-07-04 00:42:06 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-08-18 19:04:31 +0900 |
commit | 215fe54777c7183198d9789b25ea0e0af016261b (patch) | |
tree | 33fb50e4f651ad0e524ea7331243f2d61bba2bab /lib/reline.rb | |
parent | f0d3d4fedbfe64c704f8f1e42b1301384b7f52aa (diff) | |
download | ruby-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.rb | 2 |
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) |