ruby-changes:67650
From: aycabta <ko1@a...>
Date: Tue, 7 Sep 2021 03:23:41 +0900 (JST)
Subject: [ruby-changes:67650] b4d9126e43 (master): [ruby/reline] Refactor the merging key bindings to make it more readable
https://git.ruby-lang.org/ruby.git/commit/?id=b4d9126e43 From b4d9126e4332619644bfc9284688c1a8bd56d8ad Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Tue, 7 Sep 2021 03:19:50 +0900 Subject: [ruby/reline] Refactor the merging key bindings to make it more readable https://github.com/ruby/reline/commit/59665a22de --- lib/reline/config.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/reline/config.rb b/lib/reline/config.rb index a46be28..4b2655d 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -155,7 +155,10 @@ class Reline::Config https://github.com/ruby/ruby/blob/trunk/lib/reline/config.rb#L155 def key_bindings # The key bindings for each editing mode will be overwritten by the user-defined ones. - @key_actors[@editing_mode_label].default_key_bindings.merge(@additional_key_bindings[@editing_mode_label]).merge(@oneshot_key_bindings) + kb = @key_actors[@editing_mode_label].default_key_bindings.dup + kb.merge!(@additional_key_bindings[@editing_mode_label]) + kb.merge!(@oneshot_key_bindings) + kb end def add_oneshot_key_binding(keystroke, target) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/