mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix issue with 'SIGINT' handling in LineEditor#reset
@old_trap is the string "DEFAULT" and not a callable object (Proc) if there are no other signal handlers for SIGINT signal to chain.
This commit is contained in:
parent
47b04557b0
commit
3163a07878
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ class Reline::LineEditor
|
|||
@old_trap = Signal.trap('SIGINT') {
|
||||
scroll_down(@highest_in_all - @first_line_started_from)
|
||||
Reline::IOGate.move_cursor_column(0)
|
||||
@old_trap.()
|
||||
@old_trap.call if @old_trap.respond_to?(:call) # can also be string, ex: "DEFAULT"
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue