1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Ignore incompatible convert of symbols

This commit is contained in:
Koichi Sasada 2020-03-03 15:27:23 +09:00 committed by aycabta
parent 91440ff13f
commit aa9a38c0ed

View file

@ -101,6 +101,8 @@ module IRB
sym = $1
candidates = Symbol.all_symbols.collect do |s|
":" + s.id2name.encode(Encoding.default_external)
rescue Encoding::UndefinedConversionError
# ignore
end
candidates.grep(/^#{Regexp.quote(sym)}/)
else