diff options
author | aycabta <aycabta@gmail.com> | 2020-03-03 14:40:45 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-03-03 14:43:14 +0900 |
commit | 91440ff13fbf3b14dc6ac6c1e0a33bc5a1e3237c (patch) | |
tree | 70af8cfa32a56dd53a336508ecfd4953e09cf6c6 /lib/irb | |
parent | 485ef0bdc1c20237ffa8ce49ed3e90c817d572ba (diff) | |
download | ruby-91440ff13fbf3b14dc6ac6c1e0a33bc5a1e3237c.tar.gz |
Convert incompatible encoding symbol names
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/completion.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 723674738d..10533c5433 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -99,7 +99,9 @@ module IRB return nil if doc_namespace if Symbol.respond_to?(:all_symbols) sym = $1 - candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name} + candidates = Symbol.all_symbols.collect do |s| + ":" + s.id2name.encode(Encoding.default_external) + end candidates.grep(/^#{Regexp.quote(sym)}/) else [] |