ruby-changes:67289
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:30:12 +0900 (JST)
Subject: [ruby-changes:67289] cde84a5baa (master): [ruby/irb] Rescue NotFoundError of RDoc::RI::Driver#expand_name
https://git.ruby-lang.org/ruby.git/commit/?id=cde84a5baa From cde84a5baac7d854190d09a72bc8c4f40a6eb1ea Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sun, 29 Aug 2021 20:05:57 +0900 Subject: [ruby/irb] Rescue NotFoundError of RDoc::RI::Driver#expand_name https://github.com/ruby/irb/commit/c5f13b23d7 --- lib/irb/input-method.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 1e4132c..4d55e4e 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -323,7 +323,11 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L323 name = result[pointer] driver = RDoc::RI::Driver.new - name = driver.expand_name(name) + begin + name = driver.expand_name(name) + rescue RDoc::RI::Driver::NotFoundError + return nil + end doc = nil used_for_class = false if not name =~ /#|\./ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/