Skip to content

Commit

Permalink
Show original string byte sequence to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 24, 2021
1 parent 8d4f496 commit 7a97bb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
":" + 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)}/)

Expand Down

0 comments on commit 7a97bb0

Please sign in to comment.