diff options
author | aycabta <aycabta@gmail.com> | 2021-09-07 02:24:41 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-07 02:42:38 +0900 |
commit | f927614e55fd73e5af717381d84fbf0039d69b38 (patch) | |
tree | 2c9da3623e8a981c8c72cd0c82134ef9497bd54e /lib/reline | |
parent | 8d9e767f1a56fae2900bcdcbccde4e4749d17743 (diff) |
[ruby/reline] Use String for the value to be passed because Signal.trap also returns String
https://github.com/ruby/reline/commit/b908fe4439
Diffstat (limited to 'lib/reline')
-rw-r--r-- | lib/reline/line_editor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 33bcba44f1..fcd348b9f6 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -150,7 +150,7 @@ class Reline::LineEditor @screen_size = Reline::IOGate.get_screen_size @screen_height = @screen_size.first reset_variables(prompt, encoding: encoding) - @old_trap = Signal.trap(:INT) { + @old_trap = Signal.trap('INT') { clear_dialog if @scroll_partial_screen move_cursor_down(@screen_height - (@line_index - @scroll_partial_screen) - 1) @@ -171,7 +171,7 @@ class Reline::LineEditor end } begin - @old_tstp_trap = Signal.trap(:TSTP) { + @old_tstp_trap = Signal.trap('TSTP') { Reline::IOGate.ungetc("\C-z".ord) @old_tstp_trap.call if @old_tstp_trap.respond_to?(:call) } |