diff options
author | aycabta <aycabta@gmail.com> | 2019-12-09 14:20:25 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-12-09 14:21:20 +0900 |
commit | a14c01441b12552386c69233b0bcc53d06ed0b92 (patch) | |
tree | 3756a1c6ae077aaade466a0c3879c0254a1af3d2 /lib | |
parent | 3cdb37d9db9b7776f6adf96c70eacc39773718b4 (diff) | |
download | ruby-a14c01441b12552386c69233b0bcc53d06ed0b92.tar.gz |
Fix encoding compatibility checking of completion correctly
Diffstat (limited to 'lib')
-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) |