From 8075470099d02abd18f7c898e0b5abe4006515d5 Mon Sep 17 00:00:00 2001 From: Mari Imaizumi Date: Thu, 28 Nov 2024 01:12:08 +0900 Subject: [PATCH] =?UTF-8?q?wip=20raise=20=E3=81=97=E3=81=9F=E3=81=8F?= =?UTF-8?q?=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/reline/line_editor.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index d759064efe..668ec084d8 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -807,7 +807,15 @@ def editing_mode target = target.downcase if @config.completion_ignore_case list.select do |item| next unless item - next item unless Encoding.compatible?(target.encoding, item.encoding) + + unless Encoding.compatible?(target.encoding, item.encoding) + if @is_multiline + next item + else + # Workaround for readline-ext test + raise Encoding::CompatibilityError + end + end if @config.completion_ignore_case item.downcase.start_with?(target)