ruby-changes:67330
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:31:18 +0900 (JST)
Subject: [ruby-changes:67330] 32124de17e (master): [ruby/reline] Move constants of dialogs to under Reline
https://git.ruby-lang.org/ruby.git/commit/?id=32124de17e From 32124de17ef724da1e73daac4a802f2577c6010e Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sun, 29 Aug 2021 19:30:17 +0900 Subject: [ruby/reline] Move constants of dialogs to under Reline https://github.com/ruby/reline/commit/9100ea2934 --- lib/reline.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/reline.rb b/lib/reline.rb index 0ff4c31..ad3cdc6 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -179,7 +179,7 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L179 Reline::IOGate.get_screen_size end - DEFAULT_DIALOG_PROC_AUTOCOMPLETE = ->() { + Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = ->() { # autocomplete if just_cursor_moving and completion_journey_data.nil? # Auto complete starts only when edited @@ -215,10 +215,10 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L215 end [cursor_pos_to_render, result, pointer, nil] } - DEFAULT_DIALOG_CONTEXT = Array.new + Reline::DEFAULT_DIALOG_CONTEXT = Array.new require 'rdoc' - SHOW_DOC_DIALOG = ->() { + Reline::SHOW_DOC_DIALOG = ->() { if just_cursor_moving and completion_journey_data.nil? return nil end @@ -258,8 +258,8 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L258 raise ArgumentError.new('#readmultiline needs block to confirm multiline termination') end context = [] - add_dialog_proc(:autocomplete, DEFAULT_DIALOG_PROC_AUTOCOMPLETE, DEFAULT_DIALOG_CONTEXT) - add_dialog_proc(:show_doc, SHOW_DOC_DIALOG, DEFAULT_DIALOG_CONTEXT) + add_dialog_proc(:autocomplete, Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE, Reline::DEFAULT_DIALOG_CONTEXT) + add_dialog_proc(:show_doc, Reline::SHOW_DOC_DIALOG, Reline::DEFAULT_DIALOG_CONTEXT) inner_readline(prompt, add_hist, true, &confirm_multiline_termination) whole_buffer = line_editor.whole_buffer.dup -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/