diff options
author | Luke Gruber <luke.gru@gmail.com> | 2019-06-08 14:55:41 -0400 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-14 15:51:09 +0900 |
commit | 3163a07878dfcefe7914067e58de78049b056624 (patch) | |
tree | fcb5b14378cf2560cb40257d3cf435df0c7ac97c /lib | |
parent | 47b04557b01dc109ccafc33db8e80148f07457a9 (diff) | |
download | ruby-3163a07878dfcefe7914067e58de78049b056624.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index f4b72cdd8d..2f60c76aee 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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 |