Skip to content

Commit

Permalink
Handle interrupts directly at io/console
Browse files Browse the repository at this point in the history
Added to io/console at commit at 24, September, 2019
* ruby/io-console@7cba765

Released in Ruby 2.7.0, released at 25, December, 2019
* https://www.ruby-lang.org/en/news/2019/12/25/ruby-2-7-0-released/

Documented at 17, February, 2020
* ruby/io-console@82b630c

Documented in Ruby 2.7.1, released at 31, March, 2020
* https://ruby-doc.org/stdlib-2.7.1/libdoc/io/console/rdoc/IO.html#method-i-getch
* https://www.ruby-lang.org/en/news/2020/03/31/ruby-2-7-1-released/
  • Loading branch information
abinoam committed Jan 6, 2023
1 parent e0e96cb commit aea8747
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/highline/terminal/io_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def restore_mode

# (see Terminal#get_character)
def get_character
input.getch # from ruby io/console
input.getch(intr: true) # from ruby io/console
rescue Errno::ENOTTY
input.getc
end
Expand Down

0 comments on commit aea8747

Please sign in to comment.