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

ruby-changes:68115

From: aycabta <ko1@a...>
Date: Fri, 24 Sep 2021 23:50:46 +0900 (JST)
Subject: [ruby-changes:68115] 93291005a0 (master): [ruby/irb] Show original string byte sequence to debug

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

From 93291005a0bcb11d8dca4abdc645d50e1c98aefd Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Thu, 23 Sep 2021 16:20:51 +0900
Subject: [ruby/irb] Show original string byte sequence to debug

https://github.com/ruby/irb/commit/7a97bb0e56
---
 lib/irb/completion.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index a8a73cc..58328c2 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 EncodingError
           # 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/

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