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:
parent
91440ff13f
commit
aa9a38c0ed
1 changed files with 2 additions and 0 deletions
|
@ -101,6 +101,8 @@ module IRB
|
||||||
sym = $1
|
sym = $1
|
||||||
candidates = Symbol.all_symbols.collect do |s|
|
candidates = Symbol.all_symbols.collect do |s|
|
||||||
":" + s.id2name.encode(Encoding.default_external)
|
":" + s.id2name.encode(Encoding.default_external)
|
||||||
|
rescue Encoding::UndefinedConversionError
|
||||||
|
# ignore
|
||||||
end
|
end
|
||||||
candidates.grep(/^#{Regexp.quote(sym)}/)
|
candidates.grep(/^#{Regexp.quote(sym)}/)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue