[ruby/irb] Show original string byte sequence to debug

https://github.com/ruby/irb/commit/7a97bb0e56
This commit is contained in:
aycabta 2021-09-23 16:20:51 +09:00 committed by git
parent 40a65030e5
commit 93291005a0

View File

@ -194,6 +194,8 @@ module IRB
":" + s.id2name.encode(Encoding.default_external)
rescue EncodingError
# ignore
rescue Encoding::InvalidByteSequenceError => e
raise "Invalid byte sequence #{s.id2name.bytes.inspect} #{e.inspect}"
end
candidates.grep(/^#{Regexp.quote(sym)}/)