1
0
Fork 0
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:
aycabta 2021-09-23 16:20:51 +09:00
parent 49af9012a2
commit b42fe5937a

View file

@ -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)}/)