mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Show original string byte sequence to debug
This commit is contained in:
parent
49af9012a2
commit
b42fe5937a
1 changed files with 2 additions and 0 deletions
|
@ -194,6 +194,8 @@ module IRB
|
|||
":" + s.id2name.encode(Encoding.default_external)
|
||||
rescue Encoding::UndefinedConversionError
|
||||
# ignore
|
||||
rescue Encoding::InvalidByteSequenceError => e
|
||||
raise "Invalid byte sequence #{s.id2name.bytes.inspect} #{e.inspect}"
|
||||
end
|
||||
candidates.grep(/^#{Regexp.quote(sym)}/)
|
||||
|
||||
|
|
Loading…
Reference in a new issue