diff options
Diffstat (limited to 'lib/reline/line_editor.rb')
-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 f029aa4e6e..e352f8881c 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -549,7 +549,7 @@ class Reline::LineEditor private def complete_internal_proc(list, is_menu) preposing, target, postposing = retrieve_completion_block list = list.select { |i| - if i and i.encoding != Encoding::US_ASCII and i.encoding != @encoding + if i and not Encoding.compatible?(target.encoding, i.encoding) raise Encoding::CompatibilityError end i&.start_with?(target) |