[前][次][番号順一覧][スレッド一覧]

ruby-changes:68088

From: aycabta <ko1@a...>
Date: Thu, 23 Sep 2021 16:21:10 +0900 (JST)
Subject: [ruby-changes:68088] b42fe5937a (master): Show original string byte sequence to debug

https://git.ruby-lang.org/ruby.git/commit/?id=b42fe5937a

From b42fe5937ab2a605a198ffb866db5ccda541568d Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Thu, 23 Sep 2021 16:20:51 +0900
Subject: Show original string byte sequence to debug

---
 lib/irb/completion.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 7403489..e35fe2a 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -194,6 +194,8 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/completion.rb#L194
           ":" + 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)}/)
 
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]