Skip to content

Commit

Permalink
[ruby/reline] Use String for the value to be passed because Signal.tr…
Browse files Browse the repository at this point in the history
…ap also returns String

ruby/reline@b908fe4439
  • Loading branch information
aycabta authored and matzbot committed Sep 6, 2021
1 parent 8d9e767 commit f927614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def reset(prompt = '', encoding:)
@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)
Expand All @@ -171,7 +171,7 @@ def reset(prompt = '', encoding:)
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)
}
Expand Down

0 comments on commit f927614

Please sign in to comment.