[前][次][番号順一覧][スレッド一覧]

ruby-changes:67646

From: aycabta <ko1@a...>
Date: Tue, 7 Sep 2021 02:42:53 +0900 (JST)
Subject: [ruby-changes:67646] f927614e55 (master): [ruby/reline] Use String for the value to be passed because Signal.trap also returns String

https://git.ruby-lang.org/ruby.git/commit/?id=f927614e55

From f927614e55fd73e5af717381d84fbf0039d69b38 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 7 Sep 2021 02:24:41 +0900
Subject: [ruby/reline] Use String for the value to be passed because
 Signal.trap also returns String

https://github.com/ruby/reline/commit/b908fe4439
---
 lib/reline/line_editor.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 33bcba4..fcd348b 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -150,7 +150,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L150
     @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 https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L171
       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)
       }
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]